mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 06:39:14 +00:00
nvim/lsp: don't start ltex automatically at all
This commit is contained in:
parent
6e721d3a72
commit
3e52223b85
1 changed files with 1 additions and 19 deletions
|
|
@ -137,7 +137,6 @@ capabilities = require("cmp_nvim_lsp").default_capabilities(capabilities)
|
|||
----------
|
||||
require("fidget").setup()
|
||||
|
||||
|
||||
for name, config in pairs(servers) do
|
||||
require("lspconfig")[name].setup {
|
||||
capabilities = capabilities,
|
||||
|
|
@ -154,7 +153,7 @@ end
|
|||
function string:startswith(start) return self:sub(1, #start) == start end
|
||||
-- Defining Ltex plus separately to opt out of the on_attach, which overrides the tinymist bindings and break format binding
|
||||
require("lspconfig")["ltex_plus"].setup {
|
||||
autostart = false, -- Start manually with autocmd
|
||||
autostart = false, -- Start manually
|
||||
capabilities = capabilities,
|
||||
settings = {
|
||||
ltex = {
|
||||
|
|
@ -201,23 +200,6 @@ require("lspconfig")["ltex_plus"].setup {
|
|||
end,
|
||||
}
|
||||
|
||||
-- Start conditionally
|
||||
local no_ltex_paths = {
|
||||
"diary",
|
||||
"labnotes",
|
||||
"CV",
|
||||
}
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
pattern = { "typst", "gitcommit", "markdown", "mail" },
|
||||
callback = function()
|
||||
local dir = vim.fn.getcwd()
|
||||
for _, x in ipairs(no_ltex_paths) do
|
||||
if string.find(dir, x) then return end
|
||||
end
|
||||
vim.cmd([[LspStart ltex_plus]])
|
||||
end,
|
||||
})
|
||||
|
||||
------------------------
|
||||
-- Standalone plugins --
|
||||
------------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue