diff options
-rw-r--r-- | fnl/config/lsp/lsp-installer.fnl | 5 | ||||
-rw-r--r-- | fnl/config/lsp/settings/rust.fnl | 6 |
2 files changed, 11 insertions, 0 deletions
diff --git a/fnl/config/lsp/lsp-installer.fnl b/fnl/config/lsp/lsp-installer.fnl index 34a0520..9a3215a 100644 --- a/fnl/config/lsp/lsp-installer.fnl +++ b/fnl/config/lsp/lsp-installer.fnl @@ -41,11 +41,16 @@ (let [pyright (require :config.lsp.settings.pyright)] (vim.tbl_deep_extend :force pyright.opts (handler-opts)))) +(defn- rust-opts [] + (let [rust (require :config.lsp.settings.rust)] + (vim.tbl_deep_extend :force rust.opts (handler-opts)))) + (defn- get-server-opts [server] (match server :jsonls (jsonls-opts) :pyright (pyright-opts) :sumneko_lua (sumneko-lua-opts) + :rust_analyzer (rust-opts) _ (handler-opts))) (let [lsp-installer (util.load-plugin :nvim-lsp-installer) diff --git a/fnl/config/lsp/settings/rust.fnl b/fnl/config/lsp/settings/rust.fnl new file mode 100644 index 0000000..b7277a1 --- /dev/null +++ b/fnl/config/lsp/settings/rust.fnl @@ -0,0 +1,6 @@ +;; Configuration for rust langauage server. +(module config.lsp.settings.rust) + +(def opts + {:settings {:rust-analyzer {:lens {:enable true} + :checkOnSave {:command :clippy}}}}) |