From 6377f5b7091e463bf9cbdc73f3bc57183bfab67e Mon Sep 17 00:00:00 2001 From: Alpha Chen Date: Tue, 22 Nov 2022 16:23:44 -0800 Subject: [PATCH] add local-dir notes for vim lsp --- .config/nvim/fnl/lsp.fnl | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/.config/nvim/fnl/lsp.fnl b/.config/nvim/fnl/lsp.fnl index 409671c..602d5f1 100644 --- a/.config/nvim/fnl/lsp.fnl +++ b/.config/nvim/fnl/lsp.fnl @@ -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 {: lsp} vim) @@ -10,6 +25,11 @@ {:default_config {:cmd [:/opt/homebrew/bin/fennel-ls] :filetypes [:fennel] :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 {}}})) (let [{: fennel-ls} lspconfig] @@ -106,6 +126,9 @@ :cmd [:rustup :run :stable :rust-analyzer] :settings {:rust-analyzer {:checkOnSave {:command :clippy}}}}) (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}