Custom snippets and snakemake support

This commit is contained in:
Kevin Knosala 2024-04-12 12:06:47 +02:00
parent e138cc0188
commit cecf9a7f3d
5 changed files with 37 additions and 138 deletions

View file

@ -670,6 +670,7 @@ require('lazy').setup({
'rafamadriz/friendly-snippets',
config = function()
require('luasnip.loaders.from_vscode').lazy_load()
require('luasnip.loaders.from_vscode').load { paths = { './my-snippets' } }
end,
},
},
@ -714,6 +715,7 @@ require('lazy').setup({
-- This will auto-import if your LSP supports it.
-- This will expand snippets if the LSP sent a snippet.
['<C-y>'] = cmp.mapping.confirm { select = true },
['<C-z>'] = cmp.mapping.confirm { select = true },
-- Manually trigger a completion from nvim-cmp.
-- Generally you don't need this, because nvim-cmp will display
@ -733,11 +735,11 @@ require('lazy').setup({
luasnip.expand_or_jump()
end
end, { 'i', 's' }),
['<C-h>'] = cmp.mapping(function()
if luasnip.locally_jumpable(-1) then
luasnip.jump(-1)
end
end, { 'i', 's' }),
-- ['<C-h>'] = cmp.mapping(function()
-- if luasnip.locally_jumpable(-1) then
-- luasnip.jump(-1)
-- end
-- end, { 'i', 's' }),
-- For more advanced Luasnip keymaps (e.g. selecting choice nodes, expansion) see:
-- https://github.com/L3MON4D3/LuaSnip?tab=readme-ov-file#keymaps
@ -809,7 +811,7 @@ require('lazy').setup({
'nvim-treesitter/nvim-treesitter',
build = ':TSUpdate',
opts = {
ensure_installed = { 'bash', 'c', 'html', 'json', 'lua', 'luadoc', 'markdown', 'python', 'rust', 'toml', 'typst', 'vim', 'vimdoc', 'yaml' },
ensure_installed = { 'bash', 'c', 'html', 'json', 'lua', 'luadoc', 'markdown', 'python', 'rust', 'toml', 'typst', 'vim', 'vimdoc', 'yaml', 'snakemake' },
-- Autoinstall languages that are not installed
auto_install = true,
highlight = {