some minor changes to nvim init.lua
This commit is contained in:
+14
-13
@@ -13,9 +13,9 @@
|
||||
-- ============================================================================
|
||||
local fnm_current = vim.fn.trim(vim.fn.system("fnm current 2>/dev/null"))
|
||||
if fnm_current ~= "" then
|
||||
local fnm_dir = vim.fn.expand("~/.local/share/fnm")
|
||||
local fnm_bin_path = fnm_dir .. "/node-versions/" .. fnm_current .. "/installation/bin"
|
||||
vim.env.PATH = fnm_bin_path .. ":" .. vim.env.PATH
|
||||
local fnm_dir = vim.fn.expand("~/.local/share/fnm")
|
||||
local fnm_bin_path = fnm_dir .. "/node-versions/" .. fnm_current .. "/installation/bin"
|
||||
vim.env.PATH = fnm_bin_path .. ":" .. vim.env.PATH
|
||||
end
|
||||
|
||||
-- ============================================================================
|
||||
@@ -23,11 +23,14 @@ end
|
||||
-- ============================================================================
|
||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||
if not vim.loop.fs_stat(lazypath) then
|
||||
vim.fn.system({
|
||||
"git", "clone", "--filter=blob:none",
|
||||
"https://github.com/folke/lazy.nvim.git",
|
||||
"--branch=stable", lazypath,
|
||||
})
|
||||
vim.fn.system({
|
||||
"git",
|
||||
"clone",
|
||||
"--filter=blob:none",
|
||||
"https://github.com/folke/lazy.nvim.git",
|
||||
"--branch=stable",
|
||||
lazypath,
|
||||
})
|
||||
end
|
||||
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>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", "[d", vim.diagnostic.goto_prev, { desc = "Previous diagnostic" })
|
||||
-- vim.keymap.set("n", "]d", vim.diagnostic.goto_next, { desc = "Next diagnostic" })
|
||||
|
||||
vim.diagnostic.config({
|
||||
virtual_text = { prefix = "●" },
|
||||
signs = true,
|
||||
float = { border = "rounded" },
|
||||
virtual_text = { prefix = "●" },
|
||||
signs = true,
|
||||
float = { border = "rounded" },
|
||||
})
|
||||
|
||||
-- ============================================================================
|
||||
|
||||
Reference in New Issue
Block a user