mirror of
https://github.com/ksyasuda/dotfiles.git
synced 2025-12-05 02:53:38 -08:00
update nvim config and squash some bugs
This commit is contained in:
@@ -12,8 +12,8 @@ local nosilent = { noremap = true }
|
|||||||
vim.g.mapleader = " "
|
vim.g.mapleader = " "
|
||||||
vim.g.maplocalleader = ","
|
vim.g.maplocalleader = ","
|
||||||
|
|
||||||
|
-- Create a custom command with the given trigger, command, and description
|
||||||
function create_custom_command(trigger, command, description)
|
function create_custom_command(trigger, command, description)
|
||||||
-- Create a custom command with the given trigger, command, and description
|
|
||||||
vim.api.nvim_create_user_command(trigger, command, { desc = description })
|
vim.api.nvim_create_user_command(trigger, command, { desc = description })
|
||||||
end
|
end
|
||||||
-- Custom commands
|
-- Custom commands
|
||||||
|
|||||||
@@ -14,6 +14,12 @@ return {
|
|||||||
name = "copilot",
|
name = "copilot",
|
||||||
opts = {
|
opts = {
|
||||||
stream = true,
|
stream = true,
|
||||||
|
tools = true,
|
||||||
|
vision = true,
|
||||||
|
},
|
||||||
|
features = {
|
||||||
|
text = true,
|
||||||
|
tokens = true,
|
||||||
},
|
},
|
||||||
model = {
|
model = {
|
||||||
-- default = "claude-3.7-sonnet-thought",
|
-- default = "claude-3.7-sonnet-thought",
|
||||||
|
|||||||
9
.config/nvim/lua/plugins/lsp_lines.lua
Normal file
9
.config/nvim/lua/plugins/lsp_lines.lua
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
return {
|
||||||
|
"https://git.sr.ht/~whynothugo/lsp_lines.nvim",
|
||||||
|
config = function()
|
||||||
|
-- lsp_lines
|
||||||
|
vim.diagnostic.config({ virtual_text = false })
|
||||||
|
-- --
|
||||||
|
vim.keymap.set("", "<Leader>tl", require("lsp_lines").toggle, { desc = "Toggle lsp_lines" })
|
||||||
|
end,
|
||||||
|
}
|
||||||
@@ -38,7 +38,6 @@ return {
|
|||||||
|
|
||||||
for _, lsp in ipairs(servers) do
|
for _, lsp in ipairs(servers) do
|
||||||
if lsp == "lua_ls" then
|
if lsp == "lua_ls" then
|
||||||
vim.lsp.enable(lsp)
|
|
||||||
vim.lsp.config("lua_ls", {
|
vim.lsp.config("lua_ls", {
|
||||||
on_init = function(client)
|
on_init = function(client)
|
||||||
if client.workspace_folders then
|
if client.workspace_folders then
|
||||||
@@ -76,8 +75,8 @@ return {
|
|||||||
},
|
},
|
||||||
handlers = {},
|
handlers = {},
|
||||||
})
|
})
|
||||||
elseif lsp == "basedpyright" then
|
|
||||||
vim.lsp.enable(lsp)
|
vim.lsp.enable(lsp)
|
||||||
|
elseif lsp == "basedpyright" then
|
||||||
vim.lsp.config(lsp, {
|
vim.lsp.config(lsp, {
|
||||||
analysis = {
|
analysis = {
|
||||||
autoSearchPaths = true,
|
autoSearchPaths = true,
|
||||||
@@ -89,6 +88,7 @@ return {
|
|||||||
callArgumentNames = true,
|
callArgumentNames = true,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
vim.lsp.enable(lsp)
|
||||||
else
|
else
|
||||||
vim.lsp.enable(lsp)
|
vim.lsp.enable(lsp)
|
||||||
-- vim.lsp.config(lsp, {
|
-- vim.lsp.config(lsp, {
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ return {
|
|||||||
views = {
|
views = {
|
||||||
cmdline_popup = {
|
cmdline_popup = {
|
||||||
border = {
|
border = {
|
||||||
style = "none",
|
style = "rounded",
|
||||||
padding = { 0, 0 },
|
padding = { 0, 0 },
|
||||||
},
|
},
|
||||||
filter_options = {},
|
filter_options = {},
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
local ts = require("telescope")
|
local ts = require("telescope")
|
||||||
ts.load_extension("fzf")
|
-- ts.load_extension("fzf")
|
||||||
ts.load_extension("color_names")
|
ts.load_extension("color_names")
|
||||||
ts.load_extension("file_browser")
|
ts.load_extension("file_browser")
|
||||||
ts.load_extension("glyph")
|
ts.load_extension("glyph")
|
||||||
|
|||||||
@@ -19,8 +19,9 @@ function M.addToWhichKey(mappings, group)
|
|||||||
elseif not mappings and group then
|
elseif not mappings and group then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
local wk_mappings = {}
|
||||||
for _, mapping in ipairs(mappings) do
|
for _, mapping in ipairs(mappings) do
|
||||||
local wk_mappings = {}
|
wk_mappings = {}
|
||||||
if not mapping.key or mapping.key == "" then
|
if not mapping.key or mapping.key == "" then
|
||||||
vim.notify("Error: Key is empty or nil", "error")
|
vim.notify("Error: Key is empty or nil", "error")
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user