Personal LazyVim config: vimtex, LTeX, Vale, prose settings

This commit is contained in:
YannAhlgrim
2026-06-27 19:07:03 +02:00
parent 803bc181d7
commit 8ba8365eb1
15 changed files with 507 additions and 0 deletions
+39
View File
@@ -0,0 +1,39 @@
-- Copilot is installed via the LazyVim extra, but disabled by default.
-- Use <leader>ua to toggle Copilot inline suggestions and blink/cmp source.
vim.g.copilot_enabled = false
return {
-- Inline suggestions are set up but not auto-triggered by default
{
"zbirenbaum/copilot.lua",
opts = {
suggestion = {
enabled = true,
auto_trigger = false,
},
panel = {
enabled = false,
},
},
},
-- Disable copilot as a blink completion source by default
{
"saghen/blink.cmp",
optional = true,
opts = function(_, opts)
opts.sources = opts.sources or {}
opts.sources.providers = opts.sources.providers or {}
opts.sources.providers.copilot = opts.sources.providers.copilot or {
name = "copilot",
module = "blink-copilot",
score_offset = 100,
async = true,
}
opts.sources.providers.copilot.enabled = function()
return vim.g.copilot_enabled == true
end
end,
},
}
+10
View File
@@ -0,0 +1,10 @@
return {
{
"LazyVim/LazyVim",
opts = function(_, opts)
opts.diagnostics = opts.diagnostics or {}
opts.diagnostics.virtual_text = false
opts.diagnostics.virtual_lines = true
end,
},
}
+50
View File
@@ -0,0 +1,50 @@
return {
-- Ensure ltex-ls is installed via Mason
{
"williamboman/mason.nvim",
opts = function(_, opts)
opts.ensure_installed = opts.ensure_installed or {}
vim.list_extend(opts.ensure_installed, { "ltex-ls" })
end,
},
-- Configure LTeX for grammar/style/spelling in LaTeX/Markdown
{
"neovim/nvim-lspconfig",
opts = {
servers = {
ltex = {
settings = {
ltex = {
-- Change to "en-GB", "de-DE", etc. if needed
language = "en-US",
-- More thorough checks (slower but better for final drafts)
additionalRules = {
enablePickyRules = true,
},
-- Load a shared dictionary of domain/academic words
dictionary = {
["en-US"] = (function()
local words = {}
local dict_file = vim.fn.expand("~/.config/nvim/spell/ltex.dictionary.en-US.txt")
local ok, lines = pcall(vim.fn.readfile, dict_file)
if ok and lines then
for _, word in ipairs(lines) do
word = word:gsub("^%s+", ""):gsub("%s+$", "")
if word ~= "" and not word:match("^#") then
table.insert(words, word)
end
end
end
return words
end)(),
},
-- Check as you type; switch to "save" if it feels too slow
checkFrequency = "edit",
},
},
},
},
},
},
}
+34
View File
@@ -0,0 +1,34 @@
return {
{
"mrcjkb/rustaceanvim",
version = "^6", -- Recommended
lazy = false, -- This plugin is already lazy
},
{
"mfussenegger/nvim-dap",
config = function()
local dap, dapui = require("dap"), require("dapui")
dap.listeners.before.attach.dapui_config = function()
dapui.open()
end
dap.listeners.before.launch.dapui_config = function()
dapui.open()
end
dap.listeners.before.event_terminated.dapui_config = function()
dapui.close()
end
dap.listeners.before.event_exited.dapui_config = function()
dapui.close()
end
end,
},
{
"rcarriga/nvim-dap-ui",
dependencies = { "mfussenegger/nvim-dap", "nvim-neotest/nvim-nio" },
config = function()
require("dapui").setup()
end,
},
}
+12
View File
@@ -0,0 +1,12 @@
return {
{
"kylechui/nvim-surround",
version = "*", -- Use for stability; omit to use main branch for the latest features
event = "VeryLazy",
config = function()
require("nvim-surround").setup({
-- Configuration here, or leave empty for defaults
})
end,
},
}
+19
View File
@@ -0,0 +1,19 @@
return {
-- Vale is a prose linter / style checker.
-- Make sure the `vale` binary is on your $PATH (e.g. in ~/.local/bin).
{
"mfussenegger/nvim-lint",
optional = true,
opts = function(_, opts)
opts.linters_by_ft = opts.linters_by_ft or {}
-- Run Vale on LaTeX, Markdown, and plain text files.
for _, ft in ipairs({ "tex", "plaintex", "markdown", "text" }) do
opts.linters_by_ft[ft] = opts.linters_by_ft[ft] or {}
if not vim.tbl_contains(opts.linters_by_ft[ft], "vale") then
table.insert(opts.linters_by_ft[ft], "vale")
end
end
end,
},
}
+7
View File
@@ -0,0 +1,7 @@
return {
"lervag/vimtex",
init = function()
vim.g.vimtex_view_method = "zathura"
vim.g.vimtex_compiler_method = "latexmk"
end,
}