commit 0ca773bb2ddbcf0f610d97f62a111da5c7fd7f58
parent f3c83e2e6d6440490a8561b00ade5dd7a5b83edf
Author: Thomas Vigouroux <thomas.vigouroux@protonmail.com>
Date: Wed, 7 Sep 2022 11:14:32 +0200
update
Diffstat:
2 files changed, 11 insertions(+), 8 deletions(-)
diff --git a/lua/completree-config.lua b/lua/completree-config.lua
@@ -41,8 +41,10 @@ local function md_complete(...)
end
end
+local fuzzy_lsp = cc.pipeline(cc.optional(s.lsp_matches {}, s.luasnip_matches {}), ccomp.fzy)
+
local lsp_completion = {
- default = cc.pipeline(cc.optional(s.lsp_matches {}, s.luasnip_matches {}), ccomp.fzy),
+ default = fuzzy_lsp,
string = cdef.ins_completion "C-F",
comment = cdef.luasnip,
}
@@ -58,7 +60,7 @@ comp.setup {
rust = lsp_completion,
ocaml = lsp_completion,
python = lsp_completion,
- nix = lsp_completion,
+ nix = { default = fuzzy_lsp, path_expression = cdef.ins_completion "C-F", path_fragment = cdef.ins_completion "C-F" },
tex = lsp_completion,
haskell = lsp_completion,
go = lsp_completion,
diff --git a/lua/lsp_config.lua b/lua/lsp_config.lua
@@ -219,7 +219,7 @@ local system_lsps = {
filetypes = { "python" },
},
- rnix = {
+ ["rnix-lsp"] = {
filetypes = { "nix" },
},
@@ -351,10 +351,11 @@ local system_lsps = {
build = {
onSave = true,
forwardSearchAfter = false,
+ args = {"-interaction=nonstopmode", "-synctex=1", "-shell-escape", "-pdf", "%f"}
},
forwardSearch = {
executable = "zathura",
- args = { "--synctex-forward", "%l:1:%f", "%p" }
+ args = { "-x", string.format("nvim --server %s --remote-send '<cmd>edit +%%{line} %%{input}<cr>'", vim.fn.serverlist()[1]), "--synctex-forward", "%l:1:%f", "%p" }
},
}
},
@@ -381,17 +382,17 @@ require 'ltex-ls'.setup {
},
settings = {
ltex = {
+ checkFrequency = "save",
enabled = { "latex", "tex", "bib", "markdown", },
language = "auto",
diagnosticSeverity = "information",
- sentenceCacheSize = 2000,
additionalRules = {
enablePickyRules = true,
motherTongue = "fr",
},
disabledRules = {
en = { "TOO_LONG_SENTENCE" },
- fr = { "APOS_TYP", "FRENCH_WHITESPACE" }
+ fr = { "APOS_TYP", "FRENCH_WHITESPACE", "FR_SPELLING_RULE", "COMMA_PARENTHESIS_WHITESPACE" }
},
latex = {
commands = {
@@ -400,8 +401,8 @@ require 'ltex-ls'.setup {
},
dictionary = (function()
local files = {}
- for _, file in ipairs(vim.api.nvim_get_runtime_file("dict/*", true)) do
- local lang = vim.fn.fnamemodify(file, ":t:r")
+ for _, file in ipairs(vim.api.nvim_get_runtime_file("spell/*.add", true)) do
+ local lang = vim.fn.fnamemodify(file, ":t:r:r") -- Because 'spellfile' is .{encoding}.add
local fullpath = vim.fn.fnamemodify(file, ":p")
files[lang] = { ":" .. fullpath }
end