neovim things

main
Alpha Chen 2 months ago
parent 924c178b13
commit 8929fcd600
No known key found for this signature in database

@ -2,7 +2,8 @@
(set vim.o.cmdheight 0)
(set vim.o.foldlevel 2)
(set vim.o.foldlevel 1)
(set vim.o.foldminlines 2)
(set vim.o.linebreak true)
(set vim.o.list true)
(set vim.o.listchars "tab:⇥ ,trail:␣,extends:⇉,precedes:⇇,nbsp:·")
@ -123,8 +124,7 @@
;;; treesitter
(let [{: treesitter} vim
configs (require :nvim-treesitter.configs)
{: setup} configs]
{: setup} (require :nvim-treesitter.configs)]
(setup {:ensure_installed [:fennel
:hcl
:lua
@ -168,7 +168,16 @@
:ib "@block.inner"
:aa "@parameter.outer"
:ia "@parameter.inner"}}}})
(treesitter.language.register :yaml :yaml.ansible))
(treesitter.language.register :yaml :yaml.ansible)
(treesitter.query.set :python :folds "[
(function_definition)
(class_definition)
(block)
] @fold
[
(import_statement)
(import_from_statement)
]+ @fold"))
(let [tscontext (require :treesitter-context)]
(tscontext.setup))

@ -33,9 +33,14 @@
(lspconfig.ansiblels.setup {})
(lspconfig.fennel_ls.setup {:settings {:fennel-ls {:extra-globals "hs spoon vim"}}})
(lspconfig.terraformls.setup {})
(lspconfig.ts_ls.setup {})
(let [{: setup} lspconfig.yamlls
schemas {"https://json.schemastore.org/github-workflow.json" :/.github/workflows/*}]
(setup {:settings {:yaml {: schemas}}}))
;;; python
;; only enable pyright/ruff if they're there
(lspconfig.pyright.setup {:autostart false})
(lspconfig.ruff.setup {:autostart false})
(nvim-create-autocmd :FileType
@ -44,10 +49,6 @@
(if (= (vim.fn.executable lsp) 1)
(vim.cmd :LspStart lsp)))})
(let [{: setup} lspconfig.yamlls
schemas {"https://json.schemastore.org/github-workflow.json" :/.github/workflows/*}]
(setup {:settings {:yaml {: schemas}}}))
;;; efm-langserver
(let [fmt #{:formatCommand $1 :formatStdin true}

Loading…
Cancel
Save