mirror of
https://codeberg.org/qwjyh/dotfiles.git
synced 2025-06-27 03:39:20 +09:00
add: nvim: vimtex
This commit is contained in:
parent
b81618e0c8
commit
7ff8ff7744
3 changed files with 38 additions and 2 deletions
23
dotfiles/neovim/after/ftplugin/tex.lua
Normal file
23
dotfiles/neovim/after/ftplugin/tex.lua
Normal file
|
@ -0,0 +1,23 @@
|
|||
-- restore completion order of nvim-cmp
|
||||
-- source from `:help vimtex-complete-nvim-cmp`
|
||||
local cmp = require'cmp'
|
||||
cmp.setup.buffer {
|
||||
formatting = {
|
||||
format = function(entry, vim_item)
|
||||
vim_item.menu = ({
|
||||
omni = (vim.inspect(vim_item.menu):gsub('%"', "")),
|
||||
buffer = "[Buffer]",
|
||||
-- formatting for other sources
|
||||
})[entry.source.name]
|
||||
return vim_item
|
||||
end,
|
||||
},
|
||||
sources = cmp.config.sources{
|
||||
{ name = 'omni' },
|
||||
{ name = 'buffer' },
|
||||
-- { name = 'nvim_lsp' },
|
||||
{ name = 'luasnip' },
|
||||
{ name = 'buffer' },
|
||||
{ name = 'path' },
|
||||
},
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue