Reorganize lsp stuff

This commit is contained in:
Alexander Rosenberg 2023-05-03 23:11:28 -07:00
parent 2880b96499
commit 46d1d9092d
Signed by: Zander671
GPG Key ID: 5FD0394ADBD72730
2 changed files with 25 additions and 23 deletions

View File

@ -189,27 +189,7 @@
(use! :jose-elias-alvarez/null-ls.nvim (use! :jose-elias-alvarez/null-ls.nvim
:after :nvim-lspconfig :after :nvim-lspconfig
:config :config
(let [builtins (. (require :null-ls) :builtins)] (module-call! :plugin.lsp :setup-null-ls))
(setup! :null-ls
:sources [
builtins.formatting.astyle
builtins.formatting.prettier
builtins.formatting.yapf
builtins.formatting.fnlfmt
builtins.formatting.shfmt
builtins.formatting.cmake_format
builtins.formatting.latexindent
builtins.formatting.stylua
builtins.code_actions.shellcheck
(builtins.completion.spell.with { :filetypes [ :text
:markdown
:tex ]})
builtins.diagnostics.cmake_lint
builtins.diagnostics.codespell
builtins.diagnostics.shellcheck
(builtins.diagnostics.glslc.with
{ :extra_args [ "--target-env=opengl" ]})
])))
(use! :j-hui/fidget.nvim (use! :j-hui/fidget.nvim
:after :nvim-lspconfig :after :nvim-lspconfig

View File

@ -1,6 +1,6 @@
;;; lsp.fnl - lsp configurations ;;; lsp.fnl - lsp configurations
(import-macros {: bind!} :macros) (import-macros {: bind! : setup!} :macros)
(fn on-attach [client buf] (fn on-attach [client buf]
((. (. (require :cmp) :setup) :buffer) { ((. (. (require :cmp) :setup) :buffer) {
@ -109,4 +109,26 @@
:diagnostics { :diagnostics {
:globals [ "vim" ] }}}))) :globals [ "vim" ] }}})))
{ : configure : on-attach : get-data-dir } (fn setup-null-ls []
(let [builtins (. (require :null-ls) :builtins)]
(setup! :null-ls
:sources [
builtins.formatting.astyle
builtins.formatting.prettier
builtins.formatting.yapf
builtins.formatting.fnlfmt
builtins.formatting.shfmt
builtins.formatting.cmake_format
builtins.formatting.latexindent
builtins.formatting.stylua
builtins.code_actions.shellcheck
(builtins.completion.spell.with { :filetypes [ :text
:markdown
:tex ]})
builtins.diagnostics.cmake_lint
builtins.diagnostics.codespell
builtins.diagnostics.shellcheck
(builtins.diagnostics.glslc.with
{ :extra_args [ "--target-env=opengl" ]})])))
{ : configure : on-attach : get-data-dir : setup-null-ls }