updated some stuff

updated theme, now auto-switches based on kitty theme. added some tools
for plaintext writing.
This commit is contained in:
2025-04-22 15:44:34 +02:00
parent 3371860987
commit 3b14da94a9
4 changed files with 68 additions and 3 deletions
+2 -2
View File
@@ -4,8 +4,8 @@
"cmp-nvim-lsp": { "branch": "main", "commit": "99290b3ec1322070bcfb9e846450a46f6efa50f0" }, "cmp-nvim-lsp": { "branch": "main", "commit": "99290b3ec1322070bcfb9e846450a46f6efa50f0" },
"cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" }, "cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" },
"friendly-snippets": { "branch": "main", "commit": "efff286dd74c22f731cdec26a70b46e5b203c619" }, "friendly-snippets": { "branch": "main", "commit": "efff286dd74c22f731cdec26a70b46e5b203c619" },
"kanagawa": { "branch": "master", "commit": "2de175482f215c69a1d12ab10a8bf2a7a2e44ff2" }, "gruvbox": { "branch": "main", "commit": "089b60e92aa0a1c6fa76ff527837cd35b6f5ac81" },
"lazy.nvim": { "branch": "main", "commit": "e5e9bf48211a13d9ee6c1077c88327c49c1ab4a0" }, "lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
"lualine.nvim": { "branch": "master", "commit": "f4f791f67e70d378a754d02da068231d2352e5bc" }, "lualine.nvim": { "branch": "master", "commit": "f4f791f67e70d378a754d02da068231d2352e5bc" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "1a31f824b9cd5bc6f342fc29e9a53b60d74af245" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "1a31f824b9cd5bc6f342fc29e9a53b60d74af245" },
"mason.nvim": { "branch": "main", "commit": "fc98833b6da5de5a9c5b1446ac541577059555be" }, "mason.nvim": { "branch": "main", "commit": "fc98833b6da5de5a9c5b1446ac541577059555be" },
+18
View File
@@ -29,6 +29,24 @@ return {
dim_inactive = false, dim_inactive = false,
transparent_mode = false, transparent_mode = false,
}) })
vim.cmd("colorscheme gruvbox") vim.cmd("colorscheme gruvbox")
local filepath = os.getenv("HOME") .. "/.config/kitty/current-theme.conf"
local file = io.open(filepath, "r")
if not file then
vim.notify("Could not open kitty theme file: " .. filepath, vim.log.levels.ERROR)
return
end
local first_line = file:read("*l")
file:close()
if first_line and first_line:lower():find("light") then
vim.o.background = "light"
else
vim.o.background = "dark"
end
end end
} }
+33
View File
@@ -42,9 +42,42 @@ return {
lspconfig.jedi_language_server.setup({ lspconfig.jedi_language_server.setup({
capabilities = capabilities, capabilities = capabilities,
}) })
lspconfig.gopls.setup({
capabilities = capabilities,
})
lspconfig.ltex.setup({
settings = {
ltex = {
language = "de-DE", -- or "en-US", "en-GB", etc.
disabledRules = {
["de-DE"] = { "" }, -- or leave empty to enable all
},
},
},
filetypes = { "markdown", "text", "latex" }, -- Add any other types you write in
capabilities = capabilities,
})
vim.keymap.set("n", "gd", vim.lsp.buf.definition, {}) vim.keymap.set("n", "gd", vim.lsp.buf.definition, {})
vim.keymap.set("n", "K", vim.lsp.buf.hover, {}) vim.keymap.set("n", "K", vim.lsp.buf.hover, {})
vim.keymap.set({ "n", "v" }, "<leader>ca", vim.lsp.buf.code_action, {}) vim.keymap.set({ "n", "v" }, "<leader>ca", vim.lsp.buf.code_action, {})
vim.diagnostic.config({
virtual_text = {
spacing = 4,
format = function(diagnostic)
local msg = diagnostic.message
local max_len = 40
if #msg > max_len then
return msg:sub(1, max_len) .. ""
end
return msg
end,
},
float = {
border = "rounded",
max_width = 80,
focusable = false,
},
})
end, end,
}, },
} }
+15 -1
View File
@@ -3,4 +3,18 @@ vim.cmd("set shiftwidth=4")
vim.wo.relativenumber = true vim.wo.relativenumber = true
vim.opt.number = true vim.opt.number = true
vim.g.mapleader = " " vim.g.mapleader = " "
vim.cmd("set clipboard=unnamedplus") vim.api.nvim_create_autocmd("FileType", {
pattern = { "markdown", "text", "plaintex" },
callback = function()
vim.opt_local.wrap = true
vim.opt_local.linebreak = true
vim.opt_local.breakindent = true
vim.opt_local.showbreak = ""
end,
})
-- Smart navigation for wrapped lines
vim.keymap.set("n", "j", "v:count == 0 ? 'gj' : 'j'", { expr = true, silent = true })
vim.keymap.set("n", "k", "v:count == 0 ? 'gk' : 'k'", { expr = true, silent = true })
vim.keymap.set("x", "j", "v:count == 0 ? 'gj' : 'j'", { expr = true, silent = true })
vim.keymap.set("x", "k", "v:count == 0 ? 'gk' : 'k'", { expr = true, silent = true })