added neovim 0.10 transition

This commit is contained in:
Sven Vogel 2024-05-24 18:42:20 +02:00
parent c3fbaeab80
commit 135932bcf3
17 changed files with 139 additions and 225 deletions

View File

@ -6,6 +6,11 @@ for k, v in pairs(options.vim) do
vim.opt[k] = v vim.opt[k] = v
end end
-- set global vim options
for k, v in pairs(options.g) do
vim.g[k] = v
end
require("bootstrap") require("bootstrap")
-- apply color theme -- apply color theme

View File

@ -1,4 +1,10 @@
return { return {
-- global vim options
g = {
-- disable netrw
loaded_netrw = 1,
loaded_netrwPlugin = 1
},
vim = { vim = {
swapfile = false, -- disable swap files cuz they are garbage swapfile = false, -- disable swap files cuz they are garbage
clipboard = "unnamedplus", -- Sync with system clipboard clipboard = "unnamedplus", -- Sync with system clipboard
@ -57,7 +63,8 @@ return {
}, },
}, },
git = { git = {
icons = { -- symbols used by gitsigns
signs = {
add = "", add = "",
change = "¦", change = "¦",
delete = "", delete = "",
@ -65,6 +72,11 @@ return {
changedelete = "¦", changedelete = "¦",
untracked = "", untracked = "",
}, },
icons = {
add = "+",
change = "~",
delete = "-",
},
}, },
lazy = { lazy = {
install_missing = true, install_missing = true,

View File

@ -1,6 +1,10 @@
return { return {
{ {
"romgrk/barbar.nvim", "romgrk/barbar.nvim",
dependencies = {
'lewis6991/gitsigns.nvim', -- OPTIONAL: for git status
'nvim-tree/nvim-web-devicons', -- OPTIONAL: for file icons
},
init = function() init = function()
vim.g.barbar_auto_setup = false vim.g.barbar_auto_setup = false
end, end,
@ -29,6 +33,11 @@ return {
[vim.diagnostic.severity.HINT] = { enabled = true }, [vim.diagnostic.severity.HINT] = { enabled = true },
icon = options.lsp.icons.Hint, icon = options.lsp.icons.Hint,
}, },
gitsigns = {
added = { enabled = true, icon = options.git.icons.add },
changed = { enabled = true, icon = options.git.icons.change },
deleted = { enabled = true, icon = options.git.icons.deleted },
},
}, },
} }
end, end,

View File

@ -1,46 +0,0 @@
return {
{
"ms-jpq/coq_nvim",
branch = 'coq',
build = function(_)
vim.cmd("COQdeps")
end,
config = function(_, _)
vim.cmd("COQnow -s")
end,
init = function(_)
vim.g.coq_settings = {
display = {
ghost_text = {
enabled = true,
context = { "", "" },
highlight_group = "NonText"
},
pum = {
fast_close = false,
kind_context = { " ", " " },
source_context = { "", " " },
},
icons = {
spacing = 1,
mode = "short"
},
preview = {
border = "single",
x_max_len = 25,
}
}
}
end,
dependencies = {
{
'ms-jpq/coq.artifacts',
branch = "artifacts"
},
{
"ms-jpq/coq.thirdparty",
branch = "3p"
}
}
}
}

View File

@ -1,29 +1,5 @@
return { return {
{ {
"sindrets/diffview.nvim", "sindrets/diffview.nvim",
opts = {
keymaps = {
file_panel = {
{
"n", "cc",
"<Cmd>Git commit <bar> wincmd J<CR>",
{ desc = "Commit staged changes" },
},
{
"n", "ca",
"<Cmd>Git commit --amend <bar> wincmd J<CR>",
{ desc = "Amend the last commit" },
},
{
"n", "c<space>",
":Git commit ",
{ desc = "Populate command line with \":Git commit \"" },
},
},
}
}
},
{
"tpope/vim-fugitive"
} }
} }

View File

@ -1,5 +1,22 @@
return { return {
{ {
"stevearc/dressing.nvim", "stevearc/dressing.nvim",
opts = function()
local options = require('options')
return {
input = {
title_pos = "center",
border = options.ui.border,
relative = 'editor',
win_options = {
winhighlight =
'NormalFloat:Normal,FloatTitle:TelescopePromptBorder,FloatBorder:TelescopePromptBorder'
}
},
select = {
backend = { "telescope" }
}
}
end
}, },
} }

24
lua/plugins/dropbar.lua Normal file
View File

@ -0,0 +1,24 @@
return {
{
'Bekaboo/dropbar.nvim',
-- optional, but required for fuzzy finder support
dependencies = {
'nvim-telescope/telescope-fzf-native.nvim'
},
opts = {
ui = {
bar = {
separator = '',
extends = '',
},
menu = {
separator = ' ',
indicator = '',
},
},
menu = {
preview = false
}
}
}
}

View File

@ -5,16 +5,16 @@ return {
local options = require("options") local options = require("options")
return { return {
signs = { signs = {
add = { text = options.git.icons.add }, add = { text = options.git.signs.add },
change = { text = options.git.icons.change }, change = { text = options.git.signs.change },
delete = { text = options.git.icons.delete }, delete = { text = options.git.signs.delete },
topdelete = { text = options.git.icons.topdelete }, topdelete = { text = options.git.signs.topdelete },
changedelete = { text = options.git.icons.changedelete }, changedelete = { text = options.git.signs.changedelete },
untracked = { text = options.git.icons.untracked }, untracked = { text = options.git.signs.untracked },
}, },
signcolumn = true, signcolumn = true,
preview_config = { preview_config = {
border = "rounded", border = options.ui.border,
}, },
} }
end, end,

View File

@ -1,25 +0,0 @@
return {
{
"kosayoda/nvim-lightbulb",
opts = {
autocmd = { enabled = true },
sign = {
enabled = false,
},
float = {
enabled = true,
-- Text to show in the floating window.
text = "💡",
-- Highlight group to highlight the floating window.
hl = "LightBulbFloatWin",
-- Window options.
-- See |vim.lsp.util.open_floating_preview| and |nvim_open_win|.
-- Note that some options may be overridden by |open_floating_preview|.
win_opts = {
focusable = true,
border = "none",
},
},
},
},
}

View File

@ -31,22 +31,17 @@ return {
require("mason").setup() require("mason").setup()
local coq = require('coq')
local handlers = { local handlers = {
-- The first entry (without a key) will be the default handler -- The first entry (without a key) will be the default handler
-- and will be called for each installed server that doesn't have -- and will be called for each installed server that doesn't have
-- a dedicated handler. -- a dedicated handler.
function(server_name) -- default handler (optional) function(server_name) -- default handler (optional)
require("lspconfig")[server_name].setup(coq.lsp_ensure_capabilities({ require("lspconfig")[server_name].setup({
on_attach = function(client, bufnr) on_attach = function(client, bufnr)
-- setup lsp-format -- setup lsp-format
require("lsp-format").on_attach(client, bufnr) require("lsp-format").on_attach(client, bufnr)
-- setup navic
if client.server_capabilities["documentSymbolProvider"] then
require("nvim-navic").attach(client, bufnr)
end end
end })
}))
end, end,
} }
@ -65,5 +60,13 @@ return {
}, },
{ {
'lukas-reineke/lsp-format.nvim', 'lukas-reineke/lsp-format.nvim',
},
{
"jinzhongjia/LspUI.nvim",
branch = "main",
config = function()
require("LspUI").setup({
})
end
} }
} }

View File

@ -31,18 +31,6 @@ return {
}, },
}, },
lualine_b = { lualine_b = {
{
"filename",
color = "lualine_b_terminal",
symbols = {
modified = "", -- Text to show when the file is modified.
readonly = "", -- Text to show when the file is non-modifiable or readonly.
unnamed = "", -- Text to show for unnamed buffers.
newfile = "[New]", -- Text to show for newly created file before first write
},
},
},
lualine_c = {
{ {
function() function()
return '' return ''
@ -75,6 +63,18 @@ return {
vim.cmd("Mason") vim.cmd("Mason")
end, 100) end, 100)
end end
}
},
lualine_c = {
{
"filename",
path = 4,
symbols = {
modified = "", -- Text to show when the file is modified.
readonly = "", -- Text to show when the file is non-modifiable or readonly.
unnamed = "", -- Text to show for unnamed buffers.
newfile = "[New]", -- Text to show for newly created file before first write
},
}, },
{ {
"branch", "branch",

View File

@ -36,5 +36,5 @@ return {
line_up = "<C-S-Up>", line_up = "<C-S-Up>",
}, },
}, },
}, }
} }

View File

@ -1,61 +0,0 @@
return {
{
"SmiteshP/nvim-navic",
dependencies = {
"neovim/nvim-lspconfig",
},
opts = {
depth_limit_indicator = "...",
depth_limit = 8,
click = true,
},
},
{
"utilyre/barbecue.nvim",
name = "barbecue",
version = "*",
dependencies = {
"SmiteshP/nvim-navic",
"nvim-tree/nvim-web-devicons",
},
opts = {
attach_navic = false,
symbols = {
---Modification indicator.
modified = "",
---Truncation indicator.
ellipsis = "...",
---Entry separator.
separator = "",
},
kinds = {
File = "󰈙",
Module = "",
Namespace = "󰌗",
Package = "",
Class = "󰌗",
Method = "󰆧",
Property = "",
Field = "",
Constructor = "",
Enum = "󰕘",
Interface = "󰕘",
Function = "󰊕",
Variable = "󰆧",
Constant = "󰏿",
String = "󰀬",
Number = "󰎠",
Boolean = "",
Array = "󰅪",
Object = "󰅩",
Key = "󰌋",
Null = "󰟢",
EnumMember = "",
Struct = "󰌗",
Event = "",
Operator = "󰆕",
TypeParameter = "󰊄",
},
},
},
}

View File

@ -1,15 +0,0 @@
return {
{
"NeogitOrg/neogit",
dependencies = {
"nvim-lua/plenary.nvim", -- required
"sindrets/diffview.nvim", -- optional - Diff integration
-- Only one of these is needed, not both.
"nvim-telescope/telescope.nvim", -- optional
"ibhagwan/fzf-lua", -- optional
},
config = true
}
}

11
lua/plugins/satellite.lua Normal file
View File

@ -0,0 +1,11 @@
return {
{
"lewis6991/satellite.nvim",
opts = {
},
config = function(opts, _)
require('satellite').setup(opts)
end
}
}

View File

@ -1,7 +1,11 @@
return { return {
{ {
"luukvbaal/statuscol.nvim", "luukvbaal/statuscol.nvim",
priority = 1000, lazy = true,
event = {
"BufEnter",
"LspAttach"
},
config = function() config = function()
local builtin = require("statuscol.builtin") local builtin = require("statuscol.builtin")
require("statuscol").setup({ require("statuscol").setup({
@ -14,31 +18,30 @@ return {
"NvimTree", "NvimTree",
}, },
segments = { segments = {
-- folds
{
text = { builtin.foldfunc },
click = "v:lua.ScFa",
},
-- diagnostic signs -- diagnostic signs
{ {
sign = { sign = {
name = { "Diagnostic" }, namespace = { "Diagnostic" },
colwidth = 2, colwidth = 2,
maxwidth = 1,
}, },
auto = true, auto = true,
click = "v:lua.ScSa", click = "v:lua.ScSa",
}, },
-- line numbers -- line numbers
{ {
text = { builtin.lnumfunc, " " }, text = { builtin.lnumfunc },
click = "v:lua.ScLa", click = "v:lua.ScLa",
}, },
-- folds
{
text = { builtin.foldfunc },
click = "v:lua.ScFa",
},
-- git signs -- git signs
{ {
sign = { namespace = { "gitsigns" } }, sign = { namespace = { "gitsigns" }, maxwidth = 1, },
click = "v:lua.ScSa", click = "v:lua.ScSa",
}, }
}, },
}) })
end, end,

View File

@ -9,6 +9,7 @@ return {
border = "single", border = "single",
winblend = 0 winblend = 0
}, },
persist_mode = true,
start_in_insert = true, start_in_insert = true,
} }
} }