diff --git a/init.lua b/init.lua index 037c721..fd0f78a 100644 --- a/init.lua +++ b/init.lua @@ -6,7 +6,7 @@ if vim.fn.expand("$XDG_CONFIG_HOME") == "$XDG_CONFIG_HOME" then end package.path = vim.fn.expand("$XDG_CONFIG_HOME") .. "/nvim/?.lua;" .. package.path -pcall(vim.api.nvim_exec, "language en_US", true) +pcall(vim.api.nvim_exec2, "language en_US", true) local lazypath = vim.fn.expand("$XDG_CONFIG_HOME") .. "/nvim/lazy/lazy.nvim" @@ -14,7 +14,7 @@ vim.g.mapleader = " " vim.g.maplocalleader = " " --Insure lazy.nvim is installed -if not vim.loop.fs_stat(lazypath) then +if not vim.uv.fs_stat(lazypath) then vim.fn.system({ "git", "clone", @@ -140,7 +140,7 @@ vim.api.nvim_create_autocmd("LspAttach", { vim.diagnostic.config({ float = { - source = "always", + source = true, border = "rounded", }, }) diff --git a/lua/plugins/mason.lua b/lua/plugins/mason.lua index 1cb3096..07fb8af 100644 --- a/lua/plugins/mason.lua +++ b/lua/plugins/mason.lua @@ -7,6 +7,11 @@ return { vim.lsp.config("lua_ls", { settings = { Lua = { + workspace = { + library = { + "${3rd}/luv/library" + } + }, diagnostics = { globals = { "vim" } } diff --git a/remap.lua b/remap.lua index 8e5c7e4..ec31a09 100644 --- a/remap.lua +++ b/remap.lua @@ -60,8 +60,12 @@ end --LSP vim.keymap.set("n", "e", vim.diagnostic.open_float) -vim.keymap.set("n", "[d", vim.diagnostic.goto_prev) -vim.keymap.set("n", "]d", vim.diagnostic.goto_next) +vim.keymap.set("n", "[d", function () + vim.diagnostic.jump({ count = -1, float = true }) +end) +vim.keymap.set("n", "]d", function () + vim.diagnostic.jump({ count = 1, float = true }) +end) vim.keymap.set("n", "q", vim.diagnostic.setloclist) --Highlight on yank