Skip to content

Commit

Permalink
Replace .editorconfig with .dir-locals and .gitattributes (#1928)
Browse files Browse the repository at this point in the history
* Replace .editorconfig with .dir-locals and .gitattributes

Everybody working on this project is using Emacs. Committing
.dir-locals permits more direct control of Emacs-specific settings.

* Normalize files

* Move flycheck-disabled-checkers to .dir-locals.el

* Add lsp-defun to imenu-generic-expression for emacs-lisp-mode
  • Loading branch information
leungbk committed Jul 16, 2020
1 parent 305794f commit fa7ca1f
Show file tree
Hide file tree
Showing 19 changed files with 23 additions and 68 deletions.
15 changes: 15 additions & 0 deletions .dir-locals.el
@@ -0,0 +1,15 @@
((nil
(require-final-newline . t))
(emacs-lisp-mode
(eval . (let ((dirloc-lsp-defun-regexp
(concat
(concat "^\\s-*("
"lsp-defun"
"\\s-+\\(")
(or (bound-and-true-p lisp-mode-symbol-regexp)
"\\(?:\\sw\\|\\s_\\|\\\\.\\)+")
"\\)")))
(add-to-list 'imenu-generic-expression
(list "Functions" dirloc-lsp-defun-regexp 1))))
(flycheck-disabled-checkers . '(emacs-lisp-checkdoc))
(indent-tabs-mode . nil)))
10 changes: 0 additions & 10 deletions .editorconfig

This file was deleted.

1 change: 1 addition & 0 deletions .gitattributes
@@ -0,0 +1 @@
* text=auto
3 changes: 0 additions & 3 deletions .gitignore
Expand Up @@ -41,9 +41,6 @@ flycheck_*.el
# projectiles files
.projectile

# directory configuration
.dir-locals.el

/*-autoloads.el
/*-pkg.el
/.ecukes-failing-scenarios
Expand Down
4 changes: 0 additions & 4 deletions lsp-css.el
Expand Up @@ -250,7 +250,3 @@ server."

(provide 'lsp-css)
;;; lsp-css.el ends here

;; Local Variables:
;; flycheck-disabled-checkers: (emacs-lisp-checkdoc)
;; End:
4 changes: 0 additions & 4 deletions lsp-gdscript.el
Expand Up @@ -57,7 +57,3 @@
(provide 'lsp-gdscript)

;;; lsp-gdscript.el ends here

;; Local Variables:
;; flycheck-disabled-checkers: (emacs-lisp-checkdoc)
;; End:
3 changes: 0 additions & 3 deletions lsp-go.el
Expand Up @@ -257,6 +257,3 @@ $GOPATH/pkg/mod along with the value of
(provide 'lsp-go)
;;; lsp-go.el ends here

;; Local Variables:
;; flycheck-disabled-checkers: (emacs-lisp-checkdoc)
;; End:
4 changes: 0 additions & 4 deletions lsp-html.el
Expand Up @@ -192,7 +192,3 @@ styles."

(provide 'lsp-html)
;;; lsp-html.el ends here

;; Local Variables:
;; flycheck-disabled-checkers: (emacs-lisp-checkdoc)
;; End:
4 changes: 0 additions & 4 deletions lsp-intelephense.el
Expand Up @@ -199,7 +199,3 @@ language server."
(provide 'lsp-intelephense)

;;; lsp-intelephense.el ends here

;; Local Variables:
;; flycheck-disabled-checkers: (emacs-lisp-checkdoc)
;; End:
4 changes: 0 additions & 4 deletions lsp-mode.el
Expand Up @@ -8758,7 +8758,3 @@ See https://github.com/emacs-lsp/lsp-mode."

(provide 'lsp-mode)
;;; lsp-mode.el ends here

;; Local Variables:
;; flycheck-disabled-checkers: (emacs-lisp-checkdoc)
;; End:
3 changes: 0 additions & 3 deletions lsp-perl.el
Expand Up @@ -64,6 +64,3 @@
(provide 'lsp-perl)
;;; lsp-perl.el ends here

;; Local Variables:
;; flycheck-disabled-checkers: (emacs-lisp-checkdoc)
;; End:
4 changes: 0 additions & 4 deletions lsp-pyls.el
Expand Up @@ -482,7 +482,3 @@ So it will rename only references it can find."

(provide 'lsp-pyls)
;;; lsp-pyls.el ends here

;; Local Variables:
;; flycheck-disabled-checkers: (emacs-lisp-checkdoc)
;; End:
4 changes: 0 additions & 4 deletions lsp-rust.el
Expand Up @@ -711,7 +711,3 @@ The command should include `--message=format=json` or similar option."

(provide 'lsp-rust)
;;; lsp-rust.el ends here

;; Local Variables:
;; flycheck-disabled-checkers: (emacs-lisp-checkdoc)
;; End:
4 changes: 0 additions & 4 deletions lsp-solargraph.el
Expand Up @@ -153,7 +153,3 @@

(provide 'lsp-solargraph)
;;; lsp-solargraph.el ends here

;; Local Variables:
;; flycheck-disabled-checkers: (emacs-lisp-checkdoc)
;; End:
4 changes: 0 additions & 4 deletions lsp-vetur.el
Expand Up @@ -848,7 +848,3 @@ Code's JavaScript and TypeScript support."

(provide 'lsp-vetur)
;;; lsp-vetur.el ends here

;; Local Variables:
;; flycheck-disabled-checkers: (emacs-lisp-checkdoc)
;; End:
4 changes: 0 additions & 4 deletions lsp-xml.el
Expand Up @@ -213,7 +213,3 @@ Newlines and excess whitespace are removed."

(provide 'lsp-xml)
;;; lsp-xml.el ends here

;; Local Variables:
;; flycheck-disabled-checkers: (emacs-lisp-checkdoc)
;; End:
4 changes: 0 additions & 4 deletions lsp-yaml.el
Expand Up @@ -137,7 +137,3 @@

(provide 'lsp-yaml)
;;; lsp-yaml.el ends here

;; Local Variables:
;; flycheck-disabled-checkers: (emacs-lisp-checkdoc)
;; End:
11 changes: 6 additions & 5 deletions test/fixtures/requests

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions test/lsp-common-test.el
Expand Up @@ -57,6 +57,7 @@
(seq-doseq (library (-filter
(lambda (file)
(and (f-ext? file "el")
(not (s-contains? ".dir-locals" file))
(not (s-contains? "test" file))))
(append (when (or load-file-name buffer-file-name)
(f-files (f-parent (f-dirname (or load-file-name buffer-file-name)))))
Expand Down

0 comments on commit fa7ca1f

Please sign in to comment.