Files
dotfiles/nvim/.config/nvim/init.lua
T
2026-11-09 10:51:12 +01:00

70 lines
1.4 KiB
Lua

vim.cmd('set runtimepath^=~/.vim runtimepath+=~/.vim/after')
vim.cmd('let &packpath = &runtimepath')
vim.cmd('let g:python3_host_prog="/usr/bin/python"')
vim.cmd('source ~/.vimrc"')
require("tts").setup()
-- Enable LSPs
vim.lsp.enable('bashls')
vim.lsp.enable('clangd')
vim.lsp.enable('cmake')
vim.lsp.enable('jdtls')
vim.lsp.enable('jedi_language_server')
vim.lsp.enable('ltex_plus')
vim.lsp.enable('lua_ls')
vim.lsp.enable('texlab')
vim.lsp.enable('zls')
-- LSPs config
vim.lsp.config("lua_ls", {
settings = {
Lua = {
diagnostics = {
globals = { "vim" }
},
workspace = {
checkThirdParty = "Apply",
telemetry = { enable = false },
library = {
-- vim.env.VIMRUNTIME,
"${3rd}/love2d/library"
}
}
},
}
})
vim.lsp.config("zls", {
on_attach = function(client, bufnr)
vim.lsp.completion.enable(true, client.id, bufnr, {
autotrigger = true,
})
end
})
local languagetool_api_key = vim.fn.system(
{
"kwallet-query",
"--folder", "Passwords",
"--read-password", "languagetool",
"kdewallet"
})
if vim.v.shell_error ~= 0 then
error("Could not read credential from KWallet: " .. entry)
end
vim.lsp.config("ltex_plus",{
settings = {
ltex = {
language = "fr-BE",
languageToolHttpServerUri = "https://api.languagetoolplus.com",
languageToolOrg = {
username = "d.tonitch@gmail.com",
apiKey = vim.trim(languagetool_api_key)
}
}
}
})