add local-dir notes for vim lsp

pull/2/head
Alpha Chen 2 years ago
parent f73b1340b3
commit 6377f5b709
Signed by: alpha
SSH Key Fingerprint: SHA256:3fOT8fiYQG/aK9ntivV3Bqtg8AYQ7q4nV6ZgihOA20g

@ -1,3 +1,18 @@
;; Per-directory LSP usage:
;;
;; .envrc:
;; use vim
;;
;; .vimrc.local:
;; lua << EOF
;; package.path = "./.dev.local/?.fnl;" .. package.path
;; require("vimrc")
;; EOF
;;
;; .dev.local/vimrc.fnl
;; (local {: setup-lsp} (require :lsp))
;; (setup-lsp :ruby_ls)
(local lspconfig (require :lspconfig)) (local lspconfig (require :lspconfig))
(local {: lsp} vim) (local {: lsp} vim)
@ -10,6 +25,11 @@
{:default_config {:cmd [:/opt/homebrew/bin/fennel-ls] {:default_config {:cmd [:/opt/homebrew/bin/fennel-ls]
:filetypes [:fennel] :filetypes [:fennel]
:root_dir #(lspconfig.util.find_git_ancestor $1) :root_dir #(lspconfig.util.find_git_ancestor $1)
:settings {}}})
(tset configs :steep
{:default_config {:cmd ["steep langserver"]
:filetypes [:ruby]
:root_dir #(lspconfig.util.find_git_ancestor $1)
:settings {}}})) :settings {}}}))
(let [{: fennel-ls} lspconfig] (let [{: fennel-ls} lspconfig]
@ -106,6 +126,9 @@
:cmd [:rustup :run :stable :rust-analyzer] :cmd [:rustup :run :stable :rust-analyzer]
:settings {:rust-analyzer {:checkOnSave {:command :clippy}}}}) :settings {:rust-analyzer {:checkOnSave {:command :clippy}}}})
(setup-lsp :tsserver {:on_attach (on-attach-do attach-navic disable-fmt)}) (setup-lsp :tsserver {:on_attach (on-attach-do attach-navic disable-fmt)})
(setup-lsp :typeprof) ; (setup-lsp :ruby_ls)
; (setup-lsp :typeprof)
; (setup-lsp :steep)
(setup-lsp :vuels {:on_attach (on-attach-do attach-navic disable-fmt)})) (setup-lsp :vuels {:on_attach (on-attach-do attach-navic disable-fmt)}))
{: setup-lsp}

Loading…
Cancel
Save