File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -81,3 +81,27 @@ lspconfig.golangcilsp.setup {
81
81
filetypes = {' go' }
82
82
}
83
83
```
84
+
85
+ ### Configuration for [ lsp-mode] ( https://github.com/emacs-lsp/lsp-mode ) (Emacs)
86
+
87
+ ``` emacs-lisp
88
+ (with-eval-after-load 'lsp-mode
89
+ (lsp-register-custom-settings
90
+ '(("golangci-lint.command"
91
+ ["golangci-lint" "run" "--enable-all" "--disable" "lll" "--out-format" "json"])))
92
+
93
+ (lsp-register-client
94
+ (make-lsp-client :new-connection (lsp-stdio-connection
95
+ '("golangci-lint-langserver"))
96
+ :major-modes '(go-mode)
97
+ :language-id "go"
98
+ :priority 0
99
+ :server-id 'golangci-lint
100
+ :add-on? t
101
+ :library-folders-fn #'lsp-go--library-default-directories
102
+ :initialization-options (lambda ()
103
+ (gethash "golangci-lint"
104
+ (lsp-configuration-section "golangci-lint")))))
105
+
106
+ (add-to-list 'lsp-language-id-configuration '(go-mode . "golangci-lint")))
107
+ ```
You can’t perform that action at this time.
0 commit comments