diff options
Diffstat (limited to 'fnl/config/lsp/null-ls.fnl')
-rw-r--r-- | fnl/config/lsp/null-ls.fnl | 70 |
1 files changed, 38 insertions, 32 deletions
diff --git a/fnl/config/lsp/null-ls.fnl b/fnl/config/lsp/null-ls.fnl index fd3a61d..2d03b0d 100644 --- a/fnl/config/lsp/null-ls.fnl +++ b/fnl/config/lsp/null-ls.fnl @@ -1,35 +1,41 @@ ;; Adds LSP diagnostics and formatting. -(module config.lsp.null-ls {autoload {util config.util}}) -(def- mason-opts {:ensure_installed nil - :automatic_installation true - :automatic_setup false}) +(local mason-opts {:ensure_installed nil + :automatic_installation true + :automatic_setup false}) -(let [null-ls (util.prequire :null-ls) - mason-null-ls (util.prequire :mason-null-ls)] - (let [formatting null-ls.builtins.formatting - diagnostics null-ls.builtins.diagnostics] - (null-ls.setup {:debug false - :sources [diagnostics.codespell - diagnostics.cpplint - diagnostics.gitlint - diagnostics.hadolint - diagnostics.jsonlint - diagnostics.misspell - diagnostics.ruff - diagnostics.selene - diagnostics.shellcheck - diagnostics.sqlfluff - diagnostics.write_good - diagnostics.yamllint - formatting.fnlfmt - formatting.markdownlint - formatting.prettierd - formatting.ruff - formatting.rustfmt - formatting.shellharden - formatting.shfmt - formatting.sqlfluff - formatting.stylua - formatting.terraform_fmt]})) - (mason-null-ls.setup mason-opts)) +(fn setup [] + (let [null-ls (require :null-ls) + mason-null-ls (require :mason-null-ls)] + (let [formatting null-ls.builtins.formatting + diagnostics null-ls.builtins.diagnostics] + (null-ls.setup {:debug false + :sources [diagnostics.codespell + diagnostics.cpplint + diagnostics.gitlint + diagnostics.hadolint + diagnostics.jsonlint + diagnostics.misspell + diagnostics.ruff + diagnostics.selene + diagnostics.shellcheck + diagnostics.sqlfluff + diagnostics.write_good + diagnostics.yamllint + formatting.fnlfmt + formatting.markdownlint + formatting.prettierd + formatting.ruff + formatting.rustfmt + formatting.shellharden + formatting.shfmt + formatting.sqlfluff + formatting.stylua + formatting.terraform_fmt]})) + (mason-null-ls.setup mason-opts))) + +{1 :jose-elias-alvarez/null-ls.nvim + :dependencies [:mason.nvim :jayp0521/mason-null-ls.nvim] + :event :BufReadPre + :config (fn [] + (setup))} |