mirror of
https://github.com/jdhao/nvim-config.git
synced 2025-06-08 14:14:33 +02:00
add cmp-omni for working with tex
This commit is contained in:
parent
a1942e6142
commit
311768ce72
19
after/ftplugin/tex.lua
Normal file
19
after/ftplugin/tex.lua
Normal file
@ -0,0 +1,19 @@
|
||||
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]",
|
||||
})[entry.source.name]
|
||||
return vim_item
|
||||
end,
|
||||
},
|
||||
sources = cmp.config.sources({
|
||||
{ name = 'buffer' },
|
||||
{ name = 'omni',},
|
||||
})
|
||||
}
|
||||
|
||||
vim.o.textwidth = 120
|
||||
vim.o.wrap = true
|
||||
@ -1,3 +0,0 @@
|
||||
set textwidth=120
|
||||
|
||||
set wrap
|
||||
@ -33,6 +33,8 @@ require("packer").startup({
|
||||
use {"hrsh7th/cmp-nvim-lua", after = "nvim-cmp"}
|
||||
use {"hrsh7th/cmp-path", after = "nvim-cmp"}
|
||||
use {"hrsh7th/cmp-buffer", after = "nvim-cmp"}
|
||||
use { "hrsh7th/cmp-omni", after = "nvim-cmp" }
|
||||
|
||||
-- use {"hrsh7th/cmp-cmdline", after = "nvim-cmp"}
|
||||
use {"quangnguyen30192/cmp-nvim-ultisnips", after = {'nvim-cmp', 'ultisnips'}}
|
||||
if vim.g.is_mac then
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user