neovim things

main
Alpha Chen 1 month 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.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.linebreak true)
(set vim.o.list true) (set vim.o.list true)
(set vim.o.listchars "tab:⇥ ,trail:␣,extends:⇉,precedes:⇇,nbsp:·") (set vim.o.listchars "tab:⇥ ,trail:␣,extends:⇉,precedes:⇇,nbsp:·")
@ -123,8 +124,7 @@
;;; treesitter ;;; treesitter
(let [{: treesitter} vim (let [{: treesitter} vim
configs (require :nvim-treesitter.configs) {: setup} (require :nvim-treesitter.configs)]
{: setup} configs]
(setup {:ensure_installed [:fennel (setup {:ensure_installed [:fennel
:hcl :hcl
:lua :lua
@ -168,7 +168,16 @@
:ib "@block.inner" :ib "@block.inner"
:aa "@parameter.outer" :aa "@parameter.outer"
:ia "@parameter.inner"}}}}) :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)] (let [tscontext (require :treesitter-context)]
(tscontext.setup)) (tscontext.setup))

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

Loading…
Cancel
Save