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
end
-- set global vim options
for k, v in pairs(options.g) do
vim.g[k] = v
end
require("bootstrap")
-- apply color theme

View File

@ -1,22 +1,28 @@
return {
-- global vim options
g = {
-- disable netrw
loaded_netrw = 1,
loaded_netrwPlugin = 1
},
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
expandtab = true, -- spaces instead of tabs
shiftwidth = 4, -- tab width in spaces
tabstop = 4, -- Number of spaces tabs count for
expandtab = true, -- spaces instead of tabs
shiftwidth = 4, -- tab width in spaces
tabstop = 4, -- Number of spaces tabs count for
completeopt = "menu,menuone,noselect",
confirm = true, -- Confirm to save changes before exiting modified buffer
cursorline = true, -- Enable highlighting of the current line
ignorecase = true, -- Ignore case
mouse = "a", -- Enable mouse mode
number = true, -- Print line number
pumblend = 0, -- Popup pseudo transparency
pumheight = 12, -- Popup height
showmode = false, -- Dont show mode since we have a statusline
smartindent = true, -- Insert indents automatically
termguicolors = true, -- True color support
virtualedit = "block", -- Allow cursor to move where there is no text in visual block mode
confirm = true, -- Confirm to save changes before exiting modified buffer
cursorline = true, -- Enable highlighting of the current line
ignorecase = true, -- Ignore case
mouse = "a", -- Enable mouse mode
number = true, -- Print line number
pumblend = 0, -- Popup pseudo transparency
pumheight = 12, -- Popup height
showmode = false, -- Dont show mode since we have a statusline
smartindent = true, -- Insert indents automatically
termguicolors = true, -- True color support
virtualedit = "block", -- Allow cursor to move where there is no text in visual block mode
wrap = false,
foldcolumn = "1",
foldlevel = 99,
@ -57,7 +63,8 @@ return {
},
},
git = {
icons = {
-- symbols used by gitsigns
signs = {
add = "",
change = "¦",
delete = "",
@ -65,6 +72,11 @@ return {
changedelete = "¦",
untracked = "",
},
icons = {
add = "+",
change = "~",
delete = "-",
},
},
lazy = {
install_missing = true,

View File

@ -1,6 +1,10 @@
return {
{
"romgrk/barbar.nvim",
dependencies = {
'lewis6991/gitsigns.nvim', -- OPTIONAL: for git status
'nvim-tree/nvim-web-devicons', -- OPTIONAL: for file icons
},
init = function()
vim.g.barbar_auto_setup = false
end,
@ -29,6 +33,11 @@ return {
[vim.diagnostic.severity.HINT] = { enabled = true },
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,

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 {
{
"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 {
{
"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")
return {
signs = {
add = { text = options.git.icons.add },
change = { text = options.git.icons.change },
delete = { text = options.git.icons.delete },
topdelete = { text = options.git.icons.topdelete },
changedelete = { text = options.git.icons.changedelete },
untracked = { text = options.git.icons.untracked },
add = { text = options.git.signs.add },
change = { text = options.git.signs.change },
delete = { text = options.git.signs.delete },
topdelete = { text = options.git.signs.topdelete },
changedelete = { text = options.git.signs.changedelete },
untracked = { text = options.git.signs.untracked },
},
signcolumn = true,
preview_config = {
border = "rounded",
border = options.ui.border,
},
}
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()
local coq = require('coq')
local handlers = {
-- The first entry (without a key) will be the default handler
-- and will be called for each installed server that doesn't have
-- a dedicated handler.
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)
-- setup lsp-format
require("lsp-format").on_attach(client, bufnr)
-- setup navic
if client.server_capabilities["documentSymbolProvider"] then
require("nvim-navic").attach(client, bufnr)
end
end
}))
})
end,
}
@ -65,5 +60,13 @@ return {
},
{
'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 = {
{
"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()
return ''
@ -75,6 +63,18 @@ return {
vim.cmd("Mason")
end, 100)
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",

View File

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

View File

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