chore(nvim): some better cmp stuff

This commit is contained in:
Afonso Franco 2025-02-05 17:00:42 +00:00
parent e0b9a10150
commit 1c88268a12
Signed by: afonso
SSH key fingerprint: SHA256:gkVPzsQQJzqi21ntQBV6pXTx4bYI53rFGI4XtvCpwd4
5 changed files with 69 additions and 54 deletions

View file

@ -46,9 +46,6 @@ return {
vim.api.nvim_create_autocmd("LspAttach", {
group = vim.api.nvim_create_augroup("UserLspConfig", {}),
callback = function(ev)
-- Enable completion triggered by <c-x><c-o>
vim.bo[ev.buf].omnifunc = "v:lua.vim.lsp.omnifunc"
local fzflua = require("fzf-lua")
local conform = require("conform")
@ -109,9 +106,10 @@ return {
settings = {
ltex = {
language = "en-GB",
},
additionalRules = {
enablePickyRules = true,
additionalRules = {
enablePickyRules = true,
languageModel = '~/Downloads/ngrams/',
},
},
},
})
@ -122,6 +120,9 @@ return {
lspconfig["clangd"].setup({
capabilities = capabilities,
})
lspconfig["texlab"].setup({
capabilities = capabilities,
})
end,
},
{
@ -175,14 +176,22 @@ return {
filetypes = { "tex" },
config = function()
if vim.loop.os_uname().sysname == "Darwin" then
vim.g.vimtex_view_method = 'skim'
vim.g.vimtex_view_skim_sync = 1
vim.g.vimtex_view_skim_activate = 1
vim.g.vimtex_view_method = 'sioyek'
else
vim.g.vimtex_view_method = 'zathura'
end
vim.g.vimtex_compiler_method = 'latexmk'
vim.g.vimtex_view_automatic = 0
vim.g.vimtex_compiler_latexmk = {
out_dir = 'build',
options = {
"-verbose",
"-shell-escape",
"-file-line-error",
"-synctex=1",
"-interaction=nonstopmode",
}
}
vim.g.vimtex_view_automatic = 1
end,
},
{