feat: add vimtex
This commit is contained in:
parent
a373856ad5
commit
76b5001e19
4 changed files with 39 additions and 1 deletions
|
|
@ -12,6 +12,7 @@ return {
|
|||
},
|
||||
opts = function()
|
||||
local cmp = require("cmp")
|
||||
local luasnip = require("luasnip")
|
||||
return {
|
||||
completion = {
|
||||
completeopt = "menu,menuone,noinsert",
|
||||
|
|
@ -30,6 +31,28 @@ return {
|
|||
["<C-Space>"] = cmp.mapping.complete(),
|
||||
["<C-e>"] = cmp.mapping.abort(),
|
||||
["<CR>"] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
|
||||
["<C-j>"] = cmp.mapping(function(fallback)
|
||||
if luasnip.expandable() then
|
||||
luasnip.expand()
|
||||
elseif luasnip.expand_or_jumpable() then
|
||||
luasnip.expand_or_jump()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, {
|
||||
"i",
|
||||
"s",
|
||||
}),
|
||||
["<C-k>"] = cmp.mapping(function(fallback)
|
||||
if luasnip.expand_or_jumpable(-1) then
|
||||
luasnip.jump(-1)
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, {
|
||||
"i",
|
||||
"s",
|
||||
}),
|
||||
}),
|
||||
sources = cmp.config.sources({
|
||||
{ name = "nvim_lsp" },
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ return {
|
|||
},
|
||||
},
|
||||
},
|
||||
ltex = {},
|
||||
-- ltex = {},
|
||||
jdtls = {},
|
||||
gopls = {},
|
||||
sqls = {},
|
||||
|
|
|
|||
|
|
@ -91,4 +91,18 @@ return {
|
|||
t.load_extension("zoxide")
|
||||
end,
|
||||
},
|
||||
{
|
||||
"lervag/vimtex",
|
||||
lazy = true,
|
||||
event = "FileType tex",
|
||||
config = function()
|
||||
-- require("vimtex").setup()
|
||||
vim.cmd("let g:vimtex_quickfix_mode=0")
|
||||
vim.cmd("let g:vimtex_view_general_viewer = 'evince'")
|
||||
vim.cmd("let g:vimtex_compiler_method = 'latexmk'")
|
||||
vim.cmd(
|
||||
"let g:vimtex_compiler_latexmk = {'options': ['-pdf', '-shell-escape', '-file-line-error', '--extra-mem-bot=10000000', '-synctex=1', '-interaction=nonstopmode',],}"
|
||||
)
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue