summaryrefslogtreecommitdiff
path: root/fnl/conf/pkgs/lspconfig.fnl
blob: 8d01061b390a6c7d59905c93da5c3e4d41cef2b7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
(local lspconfig (require :lspconfig))
(local configs (require :lspconfig.configs))
(local {: attach} (require :conf.lsp))

(lspconfig.pyright.setup {:root_dir (lspconfig.util.root_pattern :.git
                                                                 (vim.fn.getcwd))
                          :on_attach attach})

(lspconfig.tsserver.setup {:root_dir (lspconfig.util.root_pattern :.git
                                                                  (vim.fn.getcwd))
                           :on_attach attach})

(local pid (vim.fn.getpid))
(lspconfig.omnisharp.setup {:cmd [:OmniSharp
                                  :--languageserver
                                  :--hostPID
                                  (tostring pid)]
                            :handlers {[:textDocument/definition] (. (require :omnisharp_extended)
                                                                     :handler)}
                            :root_dir (lspconfig.util.root_pattern :.git
                                                                   (vim.fn.getcwd))
                            :on_attach attach})

(lspconfig.gopls.setup {:root_dir (lspconfig.util.root_pattern :.git
                                                               (vim.fn.getcwd))
                        :on_attach attach
                        :settings {:gopls {:codelenses {:test true :bench true}
                                           ;;  Show a code lens toggling the display of gc's choices.}
                                           :buildFlags [:-tags=all]}}})

(lspconfig.ansiblels.setup {:ansible {:ansible {:path :ansible}
                                      :executionEnvironment {:enabled false}
                                      :python {:interpreterPath :python}
                                      :validation {:enabled true
                                                   :lint {:enabled false
                                                          :path :ansible-lint}}}})

;; (tset configs :fennel_language_server
;;       {:default_config {;; replace it with true path
;;                         :cmd [:fennel-language-server]
;;                         :filetypes [:fennel]
;;                         :single_file_support true
;;                         ;; source code resides in directory `fnl/`
;;                         :root_dir (lspconfig.util.root_pattern :fnl)
;;                         :settings {:fennel {:workspace {;; If you are using hotpot.nvim or aniseed,
;;                                                         ;; make the server aware of neovim runtime files.
;;                                                         :library (vim.api.nvim_list_runtime_paths)}
;;                                             :diagnostics {:globals [:vim]}}}}})
;;
;; (lspconfig.fennel_language_server.setup {:on_attach attach})