modify cmp
This commit is contained in:
parent
5a780ab55e
commit
75da7aacf5
16
init.lua
16
init.lua
|
@ -495,9 +495,17 @@ cmp.setup {
|
|||
end, { 'i', 's' }),
|
||||
},
|
||||
sources = {
|
||||
{ name = 'nvim_lsp' },
|
||||
{ name = 'luasnip' },
|
||||
{ name = 'path' },
|
||||
{ name = 'nvim_lsp', group_index = 1 },
|
||||
{ name = 'luasnip', group_index = 2 },
|
||||
{ name = 'path', group_index = 3 },
|
||||
},
|
||||
window = {
|
||||
completion = require('cmp').config.window.bordered({
|
||||
border = 'rounded',
|
||||
}),
|
||||
documentation = require('cmp').config.window.bordered({
|
||||
border = 'rounded',
|
||||
}),
|
||||
},
|
||||
formatting = {
|
||||
-- changing the order of fields so the icon is the first
|
||||
|
@ -522,7 +530,7 @@ cmp.setup {
|
|||
function highlight_neorg_code_block()
|
||||
local line = vim.fn.getline('.')
|
||||
local lang = string.match(line, '^@code%s+(%S+)')
|
||||
print('Detected language:', lang) -- Debug line
|
||||
print('Detected language:', lang) -- Debug line
|
||||
if lang then
|
||||
vim.cmd('setlocal syntax=' .. lang)
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue