summaryrefslogtreecommitdiff
path: root/fnl
diff options
context:
space:
mode:
Diffstat (limited to 'fnl')
-rw-r--r--fnl/config/lsp/init.fnl1
-rw-r--r--fnl/config/lsp/mason-null-lsp.fnl17
-rw-r--r--fnl/config/lsp/null-ls.fnl2
-rw-r--r--fnl/plugins.fnl1
4 files changed, 19 insertions, 2 deletions
diff --git a/fnl/config/lsp/init.fnl b/fnl/config/lsp/init.fnl
index 6c7f823..68d6e1d 100644
--- a/fnl/config/lsp/init.fnl
+++ b/fnl/config/lsp/init.fnl
@@ -3,6 +3,7 @@
(require :config.lsp.mason)
(require :config.lsp.mason-lspconfig)
+(require :config.lsp.mason-null-lsp)
(let [handlers (require :config.lsp.handlers)]
(handlers.setup))
diff --git a/fnl/config/lsp/mason-null-lsp.fnl b/fnl/config/lsp/mason-null-lsp.fnl
new file mode 100644
index 0000000..e35f0d7
--- /dev/null
+++ b/fnl/config/lsp/mason-null-lsp.fnl
@@ -0,0 +1,17 @@
+;; Ensure that tools needed for null-ls are installed.
+(module config.mason-null-ls {autoload {: util}})
+
+(def- opts {:ensure_installed {:flake8 :golangci-lint
+ :jsonlint :yamllint
+ :black :fnlfmt
+ :fourmolu :gofmt
+ :goimports :prettier
+ :rustfmt :stylua
+ :shellcheck :sqlformat
+ :terraform-fmt :shfmt}
+ :auto_update true
+ :automatic_installation true})
+
+(util.use-config :mason-null-ls opts)
+(let [mason-null-ls (require :mason-null-ls)]
+ (mason-null-ls.check_install true))
diff --git a/fnl/config/lsp/null-ls.fnl b/fnl/config/lsp/null-ls.fnl
index a1e16c2..1d013db 100644
--- a/fnl/config/lsp/null-ls.fnl
+++ b/fnl/config/lsp/null-ls.fnl
@@ -11,12 +11,10 @@
diagnostics.shellcheck
diagnostics.yamllint
(formatting.black.with {:extra_args [:--fast]})
- formatting.erlfmt
formatting.fnlfmt
formatting.fourmolu
formatting.gofmt
formatting.goimports
- formatting.nixfmt
(formatting.prettier.with {:extra_args [:--no-semi
:--single-quote
:--jsx-single-quote]})
diff --git a/fnl/plugins.fnl b/fnl/plugins.fnl
index 8d2ccce..eb826ad 100644
--- a/fnl/plugins.fnl
+++ b/fnl/plugins.fnl
@@ -24,6 +24,7 @@
:nvim-lualine/lualine.nvim {:requires {1 :kyazdani42/nvim-web-devicons :opt true}}
:L3MON4D3/LuaSnip {}
:williamboman/mason-lspconfig.nvim {}
+ :jayp0521/mason-null-ls.nvim {}
:williamboman/mason.nvim {}
:aktersnurra/minibar.nvim {}
:TimUntersberger/neogit {:requires :nvim-lua/plenary.nvim}