From 5712ae18c2d71fddb0bc5baa97913da2eb0fd009 Mon Sep 17 00:00:00 2001 From: Alexander Rosenberg Date: Wed, 30 Nov 2022 08:32:01 -0800 Subject: [PATCH] Add fennel-language-server --- init.fnl | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/init.fnl b/init.fnl index 0a51039..3d18f19 100644 --- a/init.fnl +++ b/init.fnl @@ -491,6 +491,7 @@ "/") ":p") joined_path))) (let [lsp (require :lspconfig) + configs (require :lspconfig.configs) lsp_cap ((. (require :cmp_nvim_lsp) :default_capabilities))] (macro setup_server! [name ...] (let [opts { :on_attach `_G.zander.lsp_on_attach @@ -518,7 +519,20 @@ :checkThirdParty false :library (vim.api.nvim_get_runtime_file "" true) } :telemetry { - :enable false }}}))) + :enable false }}}) + (tset configs :fennel_language_server { + :default_config { + :cmd [ "fennel-language-server" ] + :filetypes [ "fennel" ] + :single_file_support true + :root_dir (lsp.util.root_pattern "fnl") + :settings { + :fennel { + :workspace { + :library (vim.api.nvim_list_runtime_paths) } + :diagnostics { + :globals [ "vim" ] }}}}}) + (setup_server! :fennel_language_server))) (use! :neovim/nvim-lspconfig :after :cmp-nvim-lsp :config lsp_config_callback)