summaryrefslogtreecommitdiff
path: root/fnl/config
diff options
context:
space:
mode:
authorGustaf Rydholm <gustaf.rydholm@gmail.com>2023-01-05 19:42:18 +0100
committerGustaf Rydholm <gustaf.rydholm@gmail.com>2023-01-05 19:42:18 +0100
commit6a8b48320abb83fdf26269b35341195f9fa89952 (patch)
tree9c950ca3f1449f900e2f12295836555eb65f0384 /fnl/config
parent1e5ea6839ae5d120df35eeac0ae9df759a800b7a (diff)
Add mason-null-ls and fix diagnostics
Diffstat (limited to 'fnl/config')
-rw-r--r--fnl/config/lsp/diagnostics.fnl14
-rw-r--r--fnl/config/lsp/mason-null-ls.fnl6
-rw-r--r--fnl/config/lsp/null-ls.fnl20
3 files changed, 26 insertions, 14 deletions
diff --git a/fnl/config/lsp/diagnostics.fnl b/fnl/config/lsp/diagnostics.fnl
index adf098d..094685f 100644
--- a/fnl/config/lsp/diagnostics.fnl
+++ b/fnl/config/lsp/diagnostics.fnl
@@ -24,9 +24,11 @@
:header ""
:prefix ""}})
-(defn setup [] (apply-signs) (vim.diagnostic.config config)
- (set vim.lsp.handlers.textDocument/hover
- (vim.lsp.with {:border :rounded :width 60}))
- (set vim.lsp.handlers.textDocument/signatureHelp
- (vim.lsp.with vim.lsp.handlers.signature_help
- {:border :rounded :width 60})))
+(do
+ (apply-signs)
+ (vim.diagnostic.config config)
+ (set vim.lsp.handlers.textDocument/hover
+ (vim.lsp.with {:border :rounded :width 60}))
+ (set vim.lsp.handlers.textDocument/signatureHelp
+ (vim.lsp.with vim.lsp.handlers.signature_help
+ {:border :rounded :width 60})))
diff --git a/fnl/config/lsp/mason-null-ls.fnl b/fnl/config/lsp/mason-null-ls.fnl
new file mode 100644
index 0000000..40eaab7
--- /dev/null
+++ b/fnl/config/lsp/mason-null-ls.fnl
@@ -0,0 +1,6 @@
+;; Automatic installation and updating lsp diagnostics etc..
+(module config.lsp.mason-null-ls {autoload {util config.util}})
+
+(def- opts {:ensure_installed nil :automatic_installation true :automatic_setup false})
+
+(util.setup :mason-null-ls opts)
diff --git a/fnl/config/lsp/null-ls.fnl b/fnl/config/lsp/null-ls.fnl
index 7b810c8..2df7a55 100644
--- a/fnl/config/lsp/null-ls.fnl
+++ b/fnl/config/lsp/null-ls.fnl
@@ -5,20 +5,24 @@
(let [formatting null-ls.builtins.formatting
diagnostics null-ls.builtins.diagnostics]
(null-ls.setup {:debug false
- :sources [diagnostics.ruff
+ :sources [diagnostics.codespell
+ diagnostics.cpplint
+ diagnostics.gitlint
+ diagnostics.hadolint
diagnostics.jsonlint
+ diagnostics.misspell
+ diagnostics.ruff
+ diagnostics.selene
diagnostics.shellcheck
diagnostics.sqlfluff
- diagnostics.gitlint
- diagnostics.hadolint
- diagnostics.cpplint
+ diagnostics.write_good
diagnostics.yamllint
- formatting.ruff
formatting.fnlfmt
- (formatting.prettier.with {:extra_args [:--no-semi
- :--single-quote
- :--jsx-single-quote]})
+ formatting.markdownlint
+ formatting.prettierd
+ formatting.ruff
formatting.rustfmt
+ formatting.shellharden
formatting.shfmt
formatting.sqlfluff
formatting.stylua