style: nvim lsp border

This commit is contained in:
DACHXY 2025-01-26 22:12:10 +08:00
parent d210845352
commit 7a2679afdd
8 changed files with 282 additions and 78 deletions

View file

@ -1,71 +0,0 @@
return {
{
"lewis6991/hover.nvim",
opts = {
init = function()
-- Require providers
require("hover.providers.lsp")
-- require('hover.providers.gh')
-- require('hover.providers.gh_user')
-- require('hover.providers.jira')
-- require('hover.providers.dap')
-- require("hover.providers.fold_preview")
require("hover.providers.diagnostic")
-- require('hover.providers.man')
-- require('hover.providers.dictionary')
end,
preview_opts = {
border = "single",
},
-- Whether the contents of a currently open hover window should be moved
-- to a :h preview-window when pressing the hover keymap.
preview_window = false,
title = true,
mouse_providers = {
"LSP",
},
mouse_delay = 1000,
},
keys = {
{
"K",
mode = { "n" },
function()
require("hover").hover()
end,
desc = "hover.nvim",
},
{
"gK",
mode = { "n" },
function()
require("hover").hover_select()
end,
desc = "hover.nvim (select)",
},
{
"<c-p>",
mode = { "n" },
function()
require("hover").hover_switch("previous")
end,
desc = "hover.nvim (previous source)",
},
{
"<c-n>",
mode = { "n" },
function()
require("hover").hover_switch("next")
end,
desc = "hover.nvim (next source)",
},
{
"<MouseMove>",
function()
require("hover").hover_mouse()
end,
desc = "hover.nvim (mouse)",
},
},
},
}

View file

@ -29,6 +29,13 @@ return {
},
})
end,
ui = {
windows = {
default_options = {
border = "rounded",
},
},
},
servers = {
-- biome = {
-- root_dir = function(fname)
@ -90,7 +97,6 @@ return {
end,
},
},
setup = {},
},
},
}

View file

@ -0,0 +1,32 @@
return {
{
"nvim-neo-tree/neo-tree.nvim",
branch = "v3.x",
dependencies = {
{
"s1n7ax/nvim-window-picker", -- for open_with_window_picker keymaps
version = "2.*",
config = function()
require("window-picker").setup({
filter_rules = {
include_current_win = false,
autoselect_one = true,
-- filter using buffer options
bo = {
-- if the file type is one of following, the window will be ignored
filetype = { "neo-tree", "neo-tree-popup", "notify" },
-- if the buffer type is one of following, the window will be ignored
buftype = { "terminal", "quickfix" },
},
},
})
end,
},
},
opts = {
window = {
position = "right",
},
},
},
}

View file

@ -0,0 +1,8 @@
return { {
"folke/noice.nvim",
opts = {
presets = {
lsp_doc_border = true,
},
},
} }

View file

@ -3,6 +3,7 @@
pkgs,
device-name,
username,
inputs,
...
}:
{
@ -12,6 +13,7 @@
programs.neovim = {
enable = true;
package = inputs.neovim-nightly-overlay.packages.${pkgs.system}.default;
withPython3 = true;
extraPython3Packages = (
plugins: with plugins; [
@ -48,6 +50,7 @@
stylelint
clang-tools
taplo
zls
];
plugins = with pkgs.vimPlugins; [
@ -193,6 +196,7 @@
{ import = "lazyvim.plugins.extras.coding.luasnip" },
{ import = "lazyvim.plugins.extras.coding.mini-surround" },
{ import = "lazyvim.plugins.extras.coding.yanky" },
{ import = "lazyvim.plugins.extras.coding.neogen" },
{ import = "lazyvim.plugins.extras.dap.core" },
{ import = "lazyvim.plugins.extras.dap.nlua" },
{ import = "lazyvim.plugins.extras.editor.dial" },
@ -226,8 +230,11 @@
{ import = "lazyvim.plugins.extras.ui.treesitter-context" },
{ import = "lazyvim.plugins.extras.util.dot" },
{ import = "lazyvim.plugins.extras.util.mini-hipatterns" },
{ import = "lazyvim.plugins.extras.util.project" },
{ import = "lazyvim.plugins.extras.util.rest" },
{ import = "lazyvim.plugins.extras.editor.telescope" },
{ import = "lazyvim.plugins.extras.editor.refactoring" },
{ import = "lazyvim.plugins.extras.editor.harpoon2" },
-- uncomment to import/override with your plugins
{ import = "plugins" },
@ -271,9 +278,9 @@
command = { "nixfmt" },
},
options = {
-- nixos = {
-- expr = '(builtins.getFlake ("git+file://" + toString ./.)).nixosConfigurations.${device-name}.options',
-- },
nixos = {
expr = '(builtins.getFlake ("git+file://" + toString ./.)).nixosConfigurations.${device-name}.options',
},
home_manager = {
expr = '(builtins.getFlake ("git+file://" + toString ./.)).homeConfigurations."${username}@${device-name}".options',
}