some minor changes to nvim init.lua

This commit is contained in:
2026-04-06 21:29:50 +02:00
parent 807d011378
commit 770258ed4b
+14 -13
View File
@@ -13,9 +13,9 @@
-- ============================================================================ -- ============================================================================
local fnm_current = vim.fn.trim(vim.fn.system("fnm current 2>/dev/null")) local fnm_current = vim.fn.trim(vim.fn.system("fnm current 2>/dev/null"))
if fnm_current ~= "" then if fnm_current ~= "" then
local fnm_dir = vim.fn.expand("~/.local/share/fnm") local fnm_dir = vim.fn.expand("~/.local/share/fnm")
local fnm_bin_path = fnm_dir .. "/node-versions/" .. fnm_current .. "/installation/bin" local fnm_bin_path = fnm_dir .. "/node-versions/" .. fnm_current .. "/installation/bin"
vim.env.PATH = fnm_bin_path .. ":" .. vim.env.PATH vim.env.PATH = fnm_bin_path .. ":" .. vim.env.PATH
end end
-- ============================================================================ -- ============================================================================
@@ -23,11 +23,14 @@ end
-- ============================================================================ -- ============================================================================
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then if not vim.loop.fs_stat(lazypath) then
vim.fn.system({ vim.fn.system({
"git", "clone", "--filter=blob:none", "git",
"https://github.com/folke/lazy.nvim.git", "clone",
"--branch=stable", lazypath, "--filter=blob:none",
}) "https://github.com/folke/lazy.nvim.git",
"--branch=stable",
lazypath,
})
end end
vim.opt.rtp:prepend(lazypath) vim.opt.rtp:prepend(lazypath)
@@ -52,13 +55,11 @@ vim.keymap.set("n", "K", vim.lsp.buf.hover, { desc = "Show hover docs" })
vim.keymap.set("n", "<leader>rn", vim.lsp.buf.rename, { desc = "Rename symbol" }) vim.keymap.set("n", "<leader>rn", vim.lsp.buf.rename, { desc = "Rename symbol" })
vim.keymap.set("n", "<leader>ca", vim.lsp.buf.code_action, { desc = "Code actions" }) vim.keymap.set("n", "<leader>ca", vim.lsp.buf.code_action, { desc = "Code actions" })
vim.keymap.set("n", "<leader>e", vim.diagnostic.open_float, { desc = "Show diagnostic" }) vim.keymap.set("n", "<leader>e", vim.diagnostic.open_float, { desc = "Show diagnostic" })
-- vim.keymap.set("n", "[d", vim.diagnostic.goto_prev, { desc = "Previous diagnostic" })
-- vim.keymap.set("n", "]d", vim.diagnostic.goto_next, { desc = "Next diagnostic" })
vim.diagnostic.config({ vim.diagnostic.config({
virtual_text = { prefix = "" }, virtual_text = { prefix = "" },
signs = true, signs = true,
float = { border = "rounded" }, float = { border = "rounded" },
}) })
-- ============================================================================ -- ============================================================================