move treesitter to personalize

This commit is contained in:
Talon 2023-07-28 08:47:02 -06:00
parent 15bbd0e138
commit 1cb9751928
2 changed files with 24 additions and 19 deletions

View file

@ -18,21 +18,10 @@
(nmap "<C-B>" ":Telescope buffers<CR>" "Telescope buffers")
(nmap "<C-T>" ":Telescope treesitter<CR>" "Telescope treesitter")))
:cmp-mapping
{:<C-j> (cmp.mapping.select_next_item)
:<C-k> (cmp.mapping.select_prev_item)
:<C-d> (cmp.mapping.scroll_docs -4)
:<C-f> (cmp.mapping.scroll_docs 4)
:<C-Space> (cmp.mapping.complete)
:<CR> (cmp.mapping.confirm {:behavior cmp.ConfirmBehavior.Replace :select true})
:<Tab> (cmp.mapping (fn [fallback]
(if (cmp.visible) (cmp.select_prev_item)
(luasnip.expand_or_locally_jumpable) (luasnip.expand_or_jump)
(fallback))) [:i :s])
:<S-Tab> (cmp.mapping (fn [fallback]
(if (cmp.visible) (cmp.select_prev_item)
(luasnip.locally_jumpable -1) (luasnip.jump -1)
(fallback))) [:i :s])}
:treesitter-languages
[:c :lua :vim :vimdoc :query ; required
:fennel] ; add new languages here
:language-servers
{:lua_ls {:filetypes [:lua]
:Lua
@ -60,4 +49,19 @@
(vim.api.nvim_buf_create_user_command bufnr "Format"
#(vim.lsp.buf.format)
"Format current buffer with LSP")))
})
:cmp-mapping
{:<C-j> (cmp.mapping.select_next_item)
:<C-k> (cmp.mapping.select_prev_item)
:<C-d> (cmp.mapping.scroll_docs -4)
:<C-f> (cmp.mapping.scroll_docs 4)
:<C-Space> (cmp.mapping.complete)
:<CR> (cmp.mapping.confirm {:behavior cmp.ConfirmBehavior.Replace :select true})
:<Tab> (cmp.mapping (fn [fallback]
(if (cmp.visible) (cmp.select_prev_item)
(luasnip.expand_or_locally_jumpable) (luasnip.expand_or_jump)
(fallback))) [:i :s])
:<S-Tab> (cmp.mapping (fn [fallback]
(if (cmp.visible) (cmp.select_prev_item)
(luasnip.locally_jumpable -1) (luasnip.jump -1)
(fallback))) [:i :s])}})

View file

@ -1,8 +1,9 @@
(let
[treesitter (require :nvim-treesitter.configs)]
[treesitter (require :nvim-treesitter.configs)
{: treesitter-languages} (require :personalize)
]
(treesitter.setup
{:ensure_installed [:c :lua :vim :vimdoc :query ; required
:fennel] ; add new languages here
{:ensure_installed treesitter-languages
:sync_install false
:auto_install false
:ignore_install [] ; could :ensure_installed :all, then ignore unwanted.