Skip to content

Commit c7842fe

Browse files
Merge pull request #305 from juergenhoetzel/dir-locals
Enforce code style via .dir-locals.el
2 parents faf021a + a2f8d58 commit c7842fe

8 files changed

+384
-376
lines changed

.dir-locals.el

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
;;; Directory Local Variables
2+
;;; For more information see (info "(emacs) Directory Variables")
3+
4+
((emacs-lisp-mode . ((indent-tabs-mode . nil)
5+
(fill-column . 120))))

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
*.elc
22
bin
33
tmp
4+
*~
45

56
# Useful for doing releases
67
emacs-fsharp-mode-bin/

eglot-fsharp.el

+15-15
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
;;; eglot-fsharp.el --- fsharp-mode eglot integration -*- lexical-binding: t; -*-
22

3-
;; Copyright (C) 2019-2021 Jürgen Hötzel
3+
;; Copyright (C) 2019-2022 Jürgen Hötzel
44

5-
;; Author: Jürgen Hötzel <juergen@archlinux.org>
5+
;; Author: Jürgen Hötzel <juergen@hoetzel.info>
66
;; Package-Requires: ((emacs "27.1") (eglot "1.4") (fsharp-mode "1.10") (jsonrpc "1.0.14"))
77
;; Version: 1.10
88
;; Keywords: languages
@@ -108,18 +108,18 @@
108108
(version<= emacs-version "26.2"))
109109
"NORMAL:-VERS-TLS1.3"
110110
gnutls-algorithm-priority))))
111-
(unless (eglot-fsharp-current-version-p version)
112-
(url-copy-file url zip t)
113-
;; FIXME: Windows (unzip preinstalled?)
114-
(let ((default-directory (file-name-directory (eglot-fsharp--path-to-server))))
115-
(unless (zerop (call-process "unzip" nil nil nil "-o" zip))
116-
(error "Failed to unzip %s" zip))
117-
(unless (eq system-type 'windows-nt)
118-
(dolist (file (directory-files-recursively (file-name-directory (eglot-fsharp--path-to-server)) "." t))
119-
(if (file-directory-p file)
120-
(chmod file #o755)
121-
(chmod file #o644)))))
122-
(delete-file zip)))
111+
(unless (eglot-fsharp-current-version-p version)
112+
(url-copy-file url zip t)
113+
;; FIXME: Windows (unzip preinstalled?)
114+
(let ((default-directory (file-name-directory (eglot-fsharp--path-to-server))))
115+
(unless (zerop (call-process "unzip" nil nil nil "-o" zip))
116+
(error "Failed to unzip %s" zip))
117+
(unless (eq system-type 'windows-nt)
118+
(dolist (file (directory-files-recursively (file-name-directory (eglot-fsharp--path-to-server)) "." t))
119+
(if (file-directory-p file)
120+
(chmod file #o755)
121+
(chmod file #o644)))))
122+
(delete-file zip)))
123123

124124

125125
(defun eglot-fsharp--process-tool-action (response)
@@ -169,7 +169,7 @@ Ensure FsAutoComplete is installed (when called INTERACTIVE)."
169169
(t `("mono" ,(eglot-fsharp--path-to-server)))))
170170
(arg-list (if eglot-fsharp-server-verbose
171171
`("--background-service-enabled" "-v")
172-
`("--background-service-enabled")
172+
`("--background-service-enabled")
173173
)))
174174
(cons 'eglot-fsautocomplete (append cmd-list arg-list)))))
175175

fsharp-mode-font.el

+107-107
Large diffs are not rendered by default.

fsharp-mode-structure.el

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
;; Copyright (C) 2010 Laurent Le Brun
44

55
;; Author: 2010-2011 Laurent Le Brun <[email protected]>
6-
;; Maintainer: Robin Neatherway <[email protected]>
6+
;; Maintainer: Jürgen Hötzel <[email protected]>
77
;; Keywords: languages
88

99
;; This file is not part of GNU Emacs.

test/fsharp-mode-font-tests.el

+14-14
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,19 @@ then run BODY."
2424
(face-at-point))
2525

2626
(describe "When locking operators"
27-
(it "uses ui operator face for pipes"
28-
(with-highlighted "<<| |>> |> ||> |||> <| <|| <||| <|> <<|!"
29-
(should (equal (str-face " |> ") 'fsharp-ui-operator-face))
30-
(should (equal (str-face " ||> ") 'fsharp-ui-operator-face))
31-
(should (equal (str-face " |||> ") 'fsharp-ui-operator-face))
32-
(should (equal (str-face " <| ") 'fsharp-ui-operator-face))
33-
(should (equal (str-face " <|| ") 'fsharp-ui-operator-face))
34-
(should (equal (str-face " <||| ") 'fsharp-ui-operator-face)))))
27+
(it "uses ui operator face for pipes"
28+
(with-highlighted "<<| |>> |> ||> |||> <| <|| <||| <|> <<|!"
29+
(should (equal (str-face " |> ") 'fsharp-ui-operator-face))
30+
(should (equal (str-face " ||> ") 'fsharp-ui-operator-face))
31+
(should (equal (str-face " |||> ") 'fsharp-ui-operator-face))
32+
(should (equal (str-face " <| ") 'fsharp-ui-operator-face))
33+
(should (equal (str-face " <|| ") 'fsharp-ui-operator-face))
34+
(should (equal (str-face " <||| ") 'fsharp-ui-operator-face)))))
3535

3636
(describe "When locking operators"
37-
(it "uses ui generic face for custom operators containing pipes"
38-
(with-highlighted "<<| |>> |> ||> |||> <| <|| <||| <|> <<|!"
39-
(should (equal (str-face "<<| ") 'fsharp-ui-generic-face))
40-
(should (equal (str-face " |>> ") 'fsharp-ui-generic-face))
41-
(should (equal (str-face " <|> ") 'fsharp-ui-generic-face))
42-
(should (equal (str-face " <<|!") 'fsharp-ui-generic-face)))))
37+
(it "uses ui generic face for custom operators containing pipes"
38+
(with-highlighted "<<| |>> |> ||> |||> <| <|| <||| <|> <<|!"
39+
(should (equal (str-face "<<| ") 'fsharp-ui-generic-face))
40+
(should (equal (str-face " |>> ") 'fsharp-ui-generic-face))
41+
(should (equal (str-face " <|> ") 'fsharp-ui-generic-face))
42+
(should (equal (str-face " <<|!") 'fsharp-ui-generic-face)))))

0 commit comments

Comments
 (0)