diff options
author | Gustaf Rydholm <gustaf@nexure.io> | 2022-10-17 09:00:28 +0200 |
---|---|---|
committer | Gustaf Rydholm <gustaf@nexure.io> | 2022-10-17 09:00:28 +0200 |
commit | f9c022399a35558fe7f997dbeab3c26d7f955992 (patch) | |
tree | 30dfed56d752ff779da584ab502e9a3bda952215 /fnl/config/lsp | |
parent | a45853f468feb2be399a587664df7f4872816b53 (diff) | |
parent | f3432fc8f42246ac26f90146f13045377bc3899e (diff) |
Merge branch 'master' of github.com:aktersnurra/nvim
Diffstat (limited to 'fnl/config/lsp')
-rw-r--r-- | fnl/config/lsp/handlers.fnl | 6 | ||||
-rw-r--r-- | fnl/config/lsp/init.fnl | 10 | ||||
-rw-r--r-- | fnl/config/lsp/mason-lspconfig.fnl | 6 | ||||
-rw-r--r-- | fnl/config/lsp/mason-null-ls.fnl | 4 | ||||
-rw-r--r-- | fnl/config/lsp/mason.fnl | 4 | ||||
-rw-r--r-- | fnl/config/lsp/null-ls.fnl | 4 | ||||
-rw-r--r-- | fnl/config/lsp/settings/jsonls.fnl | 4 |
7 files changed, 14 insertions, 24 deletions
diff --git a/fnl/config/lsp/handlers.fnl b/fnl/config/lsp/handlers.fnl index c892a22..c9b7825 100644 --- a/fnl/config/lsp/handlers.fnl +++ b/fnl/config/lsp/handlers.fnl @@ -1,5 +1,5 @@ ;; Handlers for the requests and responses from and to the lsp server. -(module config.lsp.handlers {autoload {: util nvim aniseed.nvim}}) +(module config.lsp.handlers {autoload {util config.util nvim aniseed.nvim}}) (def- signs [{:name :DiagnosticSignError :text ""} {:name :DiagnosticSignWarn :text ""} @@ -55,5 +55,5 @@ (let [capabilities (vim.lsp.protocol.make_client_capabilities)] (set capabilities.textDocument.completion.completionItem.snippetSupport true) - (let [cmp-nvim-lsp (util.load-plugin :cmp_nvim_lsp)] - (cmp-nvim-lsp.update_capabilities capabilities)))) + (let [cmp-nvim-lsp (util.prequire :cmp_nvim_lsp)] + (cmp-nvim-lsp.default_capabilities capabilities)))) diff --git a/fnl/config/lsp/init.fnl b/fnl/config/lsp/init.fnl deleted file mode 100644 index 378473e..0000000 --- a/fnl/config/lsp/init.fnl +++ /dev/null @@ -1,10 +0,0 @@ -;; Loads the LSP functionality. -(module config.lsp.init {autoload {: util}}) - -(require :config.lsp.mason) -(require :config.lsp.mason-lspconfig) -(let [handlers (require :config.lsp.handlers)] - (handlers.setup)) - -(require :config.lsp.null-ls) -(require :config.lsp.mason-null-ls) diff --git a/fnl/config/lsp/mason-lspconfig.fnl b/fnl/config/lsp/mason-lspconfig.fnl index a2bd714..130fc17 100644 --- a/fnl/config/lsp/mason-lspconfig.fnl +++ b/fnl/config/lsp/mason-lspconfig.fnl @@ -1,5 +1,5 @@ ;; TBD -(module config.lsp.mason-lspconfig {autoload {: util}}) +(module config.lsp.mason-lspconfig {autoload {util config.util}}) (def- servers [:bashls :clangd @@ -49,9 +49,9 @@ (def- opts {:ensure_installed servers :automatic_installation true}) -(util.use-config :mason-lspconfig opts) +(util.setup :mason-lspconfig opts) -(let [lspconfig (util.load-plugin :lspconfig)] +(let [lspconfig (util.prequire :lspconfig)] (each [_ server (ipairs servers)] (let [server-config (. lspconfig server)] (server-config.setup (get-server-opts server))))) diff --git a/fnl/config/lsp/mason-null-ls.fnl b/fnl/config/lsp/mason-null-ls.fnl index 42b3715..33cf93f 100644 --- a/fnl/config/lsp/mason-null-ls.fnl +++ b/fnl/config/lsp/mason-null-ls.fnl @@ -1,5 +1,5 @@ ;; Ensure that tools needed for null-ls are installed. -(module config.mason-null-ls {autoload {: util}}) +(module config.mason-null-ls {autoload {util config.util}}) (def- opts {:ensure_installed [:flake8 :golangci-lint @@ -23,4 +23,4 @@ :auto_update true :automatic_installation true}) -(util.use-config :mason-null-ls opts) +(util.setup :mason-null-ls opts) diff --git a/fnl/config/lsp/mason.fnl b/fnl/config/lsp/mason.fnl index 66963cb..adc60a4 100644 --- a/fnl/config/lsp/mason.fnl +++ b/fnl/config/lsp/mason.fnl @@ -1,9 +1,9 @@ ;; Mason manages external tooling, e.g. lsp, formatters, and linters. -(module config.lsp.mason {autoload {: util}}) +(module config.lsp.mason {autoload {util config.util}}) (def- opts {:ui {:icons {:package_installed "✓" :package_pending "➜" :package_uninstalled "✗"}} :max_concurrent_installers 10}) -(util.use-config :mason opts) +(util.setup :mason opts) diff --git a/fnl/config/lsp/null-ls.fnl b/fnl/config/lsp/null-ls.fnl index 9ad1fed..7ebd25e 100644 --- a/fnl/config/lsp/null-ls.fnl +++ b/fnl/config/lsp/null-ls.fnl @@ -1,7 +1,7 @@ ;; Adds LSP diagnostics and formatting. -(module config.lsp.null-ls {autoload {: util}}) +(module config.lsp.null-ls {autoload {util config.util}}) -(let [null-ls (util.load-plugin :null-ls)] +(let [null-ls (util.prequire :null-ls)] (let [formatting null-ls.builtins.formatting diagnostics null-ls.builtins.diagnostics] (null-ls.setup {:debug false diff --git a/fnl/config/lsp/settings/jsonls.fnl b/fnl/config/lsp/settings/jsonls.fnl index a2cb78c..55c6115 100644 --- a/fnl/config/lsp/settings/jsonls.fnl +++ b/fnl/config/lsp/settings/jsonls.fnl @@ -1,7 +1,7 @@ ;; Json schema store catalog language server. -(module config.lsp.settings.jsonls {autoload {: util}}) +(module config.lsp.settings.jsonls {autoload {util config.util}}) -(let [schemastore (util.load-plugin :schemastore)] +(let [schemastore (util.prequire :schemastore)] {:init_options {:providerFormatter false} :settings {:json {:schemas (schemastore.json.schemas)}} :setup {:commands {:Format [(fn [] |