diff options
| author | Mike Vink <mike1994vink@gmail.com> | 2023-04-22 20:42:34 +0200 |
|---|---|---|
| committer | Mike Vink <mike1994vink@gmail.com> | 2023-04-22 20:42:34 +0200 |
| commit | b91bb045f335eb2e15bebc5fa108e5893b5d9951 (patch) | |
| tree | 63491f4773069755ed5b8f5d344b202b34f23bc6 /fnl/conf/pkgs | |
| parent | 1b6566231b8bfc8223fcbf11d1243d9328f65f4f (diff) | |
small things
Diffstat (limited to 'fnl/conf/pkgs')
| -rw-r--r-- | fnl/conf/pkgs/cmp.fnl | 2 | ||||
| -rw-r--r-- | fnl/conf/pkgs/lspconfig.fnl | 7 | ||||
| -rw-r--r-- | fnl/conf/pkgs/null-ls.fnl | 33 |
3 files changed, 29 insertions, 13 deletions
diff --git a/fnl/conf/pkgs/cmp.fnl b/fnl/conf/pkgs/cmp.fnl index 51a88f0..76319f4 100644 --- a/fnl/conf/pkgs/cmp.fnl +++ b/fnl/conf/pkgs/cmp.fnl @@ -53,7 +53,7 @@ [:i :s])) :<C-b> (cmp.mapping.scroll_docs -4) :<C-f> (cmp.mapping.scroll_docs 4) - :<C-A> (cmp.mapping.complete) + :<C-j> (cmp.mapping.complete) :<CR> (cmp.mapping.confirm {:behavior (enum :ConfirmBehavior :Replace) :select true})} diff --git a/fnl/conf/pkgs/lspconfig.fnl b/fnl/conf/pkgs/lspconfig.fnl index c2803cd..8d01061 100644 --- a/fnl/conf/pkgs/lspconfig.fnl +++ b/fnl/conf/pkgs/lspconfig.fnl @@ -28,6 +28,13 @@ ;; Show a code lens toggling the display of gc's choices.} :buildFlags [:-tags=all]}}}) +(lspconfig.ansiblels.setup {:ansible {:ansible {:path :ansible} + :executionEnvironment {:enabled false} + :python {:interpreterPath :python} + :validation {:enabled true + :lint {:enabled false + :path :ansible-lint}}}}) + ;; (tset configs :fennel_language_server ;; {:default_config {;; replace it with true path ;; :cmd [:fennel-language-server] diff --git a/fnl/conf/pkgs/null-ls.fnl b/fnl/conf/pkgs/null-ls.fnl index 858d0d3..9908823 100644 --- a/fnl/conf/pkgs/null-ls.fnl +++ b/fnl/conf/pkgs/null-ls.fnl @@ -1,12 +1,21 @@ -(let [null-ls (require :null-ls) - lsp-conf (require :conf.lsp)] - (null-ls.setup {:update_on_insert false - :on_attach (fn [client buf] - (lsp-conf.attach client buf true)) - :sources [null-ls.builtins.formatting.black - null-ls.builtins.formatting.goimports - null-ls.builtins.formatting.gofumpt - null-ls.builtins.formatting.raco_fmt - null-ls.builtins.formatting.alejandra - null-ls.builtins.formatting.terraform_fmt - null-ls.builtins.formatting.fnlfmt]})) +(local lsp-conf (require :conf.lsp)) +(local null-ls (require :null-ls)) + +(local fmt null-ls.builtins.formatting) +(local diag null-ls.builtins.diagnostics) + +(fn executable? [program] + (fn [] + (= 1 (vim.fn.executable program)))) + +(null-ls.setup {:update_in_insert false + :debug true + :on_attach (fn [client buf] + (lsp-conf.attach client buf true)) + :sources [fmt.alejandra + fmt.fnlfmt + (fmt.black.with {:condition (executable? :black)}) + (fmt.goimports.with {:condition (executable? :goimports)}) + (fmt.gofumpt.with {:condition (executable? :gofumpt)}) + (fmt.raco_fmt.with {:condition (executable? :raco)}) + (fmt.terraform_fmt.with {:condition (executable? :terraform)})]}) |
