Compare commits

..

2 Commits

Author SHA1 Message Date
46d1d9092d
Reorganize lsp stuff 2023-05-03 23:11:28 -07:00
2880b96499
Fix typos 2023-05-03 23:04:38 -07:00
3 changed files with 26 additions and 24 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 }

View File

@ -81,7 +81,7 @@
"Enabled Spellcheck" "Enabled Spellcheck"
"Disabled Spellcheck"))))) "Disabled Spellcheck")))))
;; Enable spell in certian buffers ;; Enable spell in certain buffers
(hook! :FileType [ :text :markdown :tex :bib ] (hook! :FileType [ :text :markdown :tex :bib ]
#(if (= (vim.fn.buflisted (vim.api.nvim_get_current_buf)) 1) #(if (= (vim.fn.buflisted (vim.api.nvim_get_current_buf)) 1)
(set vim.opt_local.spell true))) (set vim.opt_local.spell true)))