Fixed neovim deprecation warnings

This commit is contained in:
2025-07-27 19:53:07 +09:00
parent 89562aa3e5
commit e9ffdfe393
3 changed files with 14 additions and 5 deletions
+3 -3
View File
@@ -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",
},
})
+5
View File
@@ -7,6 +7,11 @@ return {
vim.lsp.config("lua_ls", {
settings = {
Lua = {
workspace = {
library = {
"${3rd}/luv/library"
}
},
diagnostics = {
globals = { "vim" }
}
+6 -2
View File
@@ -60,8 +60,12 @@ end
--LSP
vim.keymap.set("n", "<leader>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", "<leader>q", vim.diagnostic.setloclist)
--Highlight on yank