Compare commits

...

29 Commits
main ... rework

Author SHA1 Message Date
Sven Vogel 848140c454 Merge branch 'main' into rework
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 21s Details
2024-09-05 19:53:23 +02:00
Sven Vogel af6ffea285 added catppuccin theme 2024-08-16 19:24:09 +02:00
Sven Vogel 4a079b4160 file tree no longer changes root 2024-06-06 14:22:54 +02:00
Sven Vogel c17e8cf7aa changed highlight of lsp-lens 2024-06-06 14:05:09 +02:00
Sven Vogel d2979fe139 reduced width of file tree to 30 2024-06-06 13:06:47 +02:00
Sven Vogel 9316b1907e removed lsp-format in favor of keybind and quick-tool 2024-06-06 12:40:35 +02:00
Sven Vogel 135932bcf3 added neovim 0.10 transition 2024-05-24 18:42:20 +02:00
Sven Vogel c3fbaeab80 removed neogit 2024-05-22 00:12:00 +02:00
Sven Vogel 3e40a00cd3 added neogit 2024-05-21 23:35:59 +02:00
Sven Vogel 5e30128549 added toggleterm 2024-05-21 23:32:07 +02:00
Sven Vogel a32e59eca1 various changes 2024-05-17 00:30:15 +02:00
Sven Vogel cf3594a8a9 added new plugins 2024-05-12 19:38:26 +02:00
Sven Vogel 5060fc3cb0 added dashboard 2024-04-16 14:13:38 +02:00
Sven Vogel 3d8a4f5b73 added navic and winbar 2024-04-13 17:00:38 +02:00
Sven Vogel f99d06e217 added mini and refined keymaps 2024-04-13 13:12:50 +02:00
Sven Vogel e5602dd693 added conform formatter and formatted all files 2024-04-13 10:49:11 +02:00
Sven Vogel 6c68f8d6c7 added luasnip as cmp snippet engine 2024-04-13 10:26:19 +02:00
Sven Vogel 4258701c98 added barbar bufferline 2024-04-11 15:30:25 +02:00
Sven Vogel 44f3b93498 swapped neotree with nvimtree 2024-03-28 00:32:16 +01:00
Sven Vogel ba78758b9a updated telescope prompt 2024-03-26 11:23:47 +01:00
Sven Vogel df75ab6508 refined configuration 2024-03-15 18:29:30 +01:00
Sven Vogel abcbab5a8c disable neo tree tabs 2024-03-03 21:40:38 +01:00
Sven Vogel e8016d5020 diagnostics in status column auto closes when empty 2024-03-03 21:36:20 +01:00
Sven Vogel c80f37810a made diagnostic column in status line 2 wide 2024-03-03 21:09:02 +01:00
Sven Vogel 3c79424940 git improvements 2024-03-03 21:02:51 +01:00
Sven Vogel 692cbbd6ba removed coq 2024-03-02 09:58:41 +01:00
Sven Vogel 69123b9bf0 updated files 2024-03-01 18:57:06 +01:00
Sven Vogel 6d0e50f053 updated files for rework v1 2024-02-25 18:12:48 +01:00
Sven Vogel 0846455551 added files for rework v1 2024-02-23 19:23:02 +01:00
56 changed files with 1073 additions and 1298 deletions

5
.luarc.json Normal file
View File

@ -0,0 +1,5 @@
{
"diagnostics.globals": [
"vim"
]
}

View File

@ -1,4 +1,27 @@
require('core.options')
require('core.keymaps')
require('core.autocmds')
require("core.bootstrap")
-- load options
local options = require("options")
-- set neovim options
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
local status, _ = pcall(vim.cmd, "colorscheme " .. options.ui.theme)
if not status then
print("Colorscheme not found: " .. options.ui.theme) -- Print an error message if the colorscheme is not installed
return
end
-- apply keymap
local keymap = require("keymap")
for _, v in pairs(keymap) do
vim.keymap.set(v[1], v[2], v[3], v[4])
end

38
lua/bootstrap.lua Normal file
View File

@ -0,0 +1,38 @@
-- Bootstrap lazy.nvim plugin manager
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
"--branch=stable", -- latest stable release
lazypath,
})
end
vim.opt.rtp:prepend(lazypath)
local options = require("options")
require("lazy").setup({
spec = {
{
import = "plugins",
},
},
install = {
missing = options.lazy.install_missing,
colorscheme = {
options.ui.theme,
},
},
ui = {
size = {
width = options.ui.popup.width,
height = options.ui.popup.height,
},
border = options.ui.border,
wrap = true,
icons = options.lazy.icons,
},
})

View File

@ -1,3 +0,0 @@
-- Autocmds are automatically loaded on the VeryLazy event
-- Default autocmds that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/autocmds.lua
-- Add any additional autocmds here

View File

@ -1,118 +0,0 @@
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
-- bootstrap lazy.nvim
-- stylua: ignore
vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git",
"--branch=stable",
lazypath })
end
vim.opt.rtp:prepend(vim.env.LAZY or lazypath)
require("lazy").setup({
spec = {
-- add LazyVim and import its plugins
{ "LazyVim/LazyVim" },
-- import any extras modules here
-- { import = "lazyvim.plugins.extras.lang.typescript" },
-- { import = "lazyvim.plugins.extras.lang.json" },
-- { import = "lazyvim.plugins.extras.ui.mini-animate" },
-- import/override with your plugins
{ import = "plugins" },
},
defaults = {
-- By default, only LazyVim plugins will be lazy-loaded. Your custom plugins will load during startup.
-- If you know what you're doing, you can set this to `true`
-- to have all your custom plugins lazy-loaded by default.
lazy = false,
-- It's recommended to leave version=false for now, since a lot the plugin that support versioning,
-- have outdated releases, which may break your Neovim install.
version = false, -- always use the latest git commit
-- version = "*", -- try installing the latest stable version for plugins that support semver
keymaps = true,
},
-- install = { colorscheme = { "tokyonight" } },
checker = { enabled = true }, -- automatically check for plugin updates
performance = {
rtp = {
-- disable some rtp plugins
disabled_plugins = {
"gzip",
-- "matchit",
-- "matchparen",
-- "netrwPlugin",
"tarPlugin",
"tohtml",
"tutor",
"zipPlugin",
},
},
},
icons = {
ft = "",
lazy = "󰂠 ",
loaded = "",
not_loaded = "",
misc = {
dots = "󰇘",
},
dap = {
Stopped = { "󰁕 ", "DiagnosticWarn", "DapStoppedLine" },
Breakpoint = "",
BreakpointCondition = "",
BreakpointRejected = { "", "DiagnosticError" },
LogPoint = ".>",
},
diagnostics = {
Error = "",
Warn = "",
Hint = "",
Info = "",
},
git = {
added = "+",
modified = "~",
removed = "-",
},
kinds = {
Array = "",
Boolean = "󰨙 ",
Class = "",
Codeium = "󰘦 ",
Color = "",
Control = "",
Collapsed = "",
Constant = "󰏿 ",
Constructor = "",
Copilot = "",
Enum = "",
EnumMember = "",
Event = "",
Field = "",
File = "",
Folder = "",
Function = "󰊕 ",
Interface = "",
Key = "",
Keyword = "",
Method = "󰊕 ",
Module = "",
Namespace = "󰦮 ",
Null = "",
Number = "󰎠 ",
Object = "",
Operator = "",
Package = "",
Property = "",
Reference = "",
Snippet = "",
String = "",
Struct = "󰆼 ",
TabNine = "󰏚 ",
Text = "",
TypeParameter = "",
Unit = "",
Value = "",
Variable = "󰀫 ",
},
},
})

View File

@ -1,15 +0,0 @@
local map = vim.keymap.set
map({ 'n', 'i' }, '<C-g>', '<cmd>Telescope<CR>', { noremap = true })
-- save file on <STRG + S>
map({ "i", "x", "n", "s" }, "<C-s>", "<cmd>w<cr><esc>", { desc = "Save file" })
-- new file
map("n", "<C-t>", "<cmd>enew<cr>", { desc = "New File" })
map({ 'n', 'i' }, '<C-z>', '<cmd>u<CR>')
map({ 'n', 'i' }, '<C-y>', '<cmd>redo<CR>')
-- shift back command
map({ 'n', 'i' }, '<S-tab>', '<cmd><<CR>')

View File

@ -1,23 +0,0 @@
return {
lua_ls = {
mason = false
},
bashls = {
mason = false,
},
clangd = {
mason = false
},
arduino_language_server = {
mason = false
},
pyright = {
mason = false
},
html = {
mason = false
},
gopls = {
mason = false
}
}

View File

@ -1,59 +0,0 @@
local opt = vim.opt
opt.swapfile = false -- disable swapfiles because they are fucking garbage
opt.autowrite = true -- Enable auto write
opt.clipboard = "unnamedplus" -- Sync with system clipboard
opt.completeopt = "menu,menuone,noselect"
opt.conceallevel = 3 -- Hide * markup for bold and italic
opt.confirm = true -- Confirm to save changes before exiting modified buffer
opt.cursorline = true -- Enable highlighting of the current line
opt.expandtab = true -- Use spaces instead of tabs
opt.formatoptions = "jcroqlnt" -- tcqj
opt.grepformat = "%f:%l:%c:%m"
opt.grepprg = "rg --vimgrep"
opt.ignorecase = true -- Ignore case
opt.inccommand = "nosplit" -- preview incremental substitute
opt.laststatus = 3 -- global statusline
opt.list = true -- Show some invisible characters (tabs...
opt.mouse = "a" -- Enable mouse mode
opt.number = true -- Print line number
opt.pumblend = 0 -- Popup blend
opt.pumheight = 10 -- Maximum number of entries in a popup
opt.relativenumber = false -- Relative line numbers
opt.scrolloff = 4 -- Lines of context
opt.sessionoptions = { "buffers", "curdir", "tabpages", "winsize", "help", "globals", "skiprtp", "folds" }
opt.shiftround = true -- Round indent
opt.shiftwidth = 4 -- Size of an indent
opt.shortmess:append({ W = true, I = true, c = true, C = true })
opt.showmode = false -- Dont show mode since we have a statusline
opt.sidescrolloff = 8 -- Columns of context
opt.signcolumn = "yes" -- Always show the signcolumn, otherwise it would shift the text each time
opt.smartcase = false -- Don't ignore case with capitals
opt.smartindent = true -- Insert indents automatically
opt.spelllang = { "en" }
opt.splitbelow = false -- Put new windows below current
opt.splitkeep = "screen"
opt.splitright = true -- Put new windows right of current
opt.tabstop = 4 -- Number of spaces tabs count for
opt.termguicolors = true -- True color support
opt.timeoutlen = 300
opt.undofile = true
opt.foldcolumn = '1'
opt.foldlevel = 99
opt.foldlevelstart = 99
opt.showtabline = 2
opt.foldenable = true
opt.undolevels = 10000
opt.updatetime = 200 -- Save swap file and trigger CursorHold
opt.virtualedit = "block" -- Allow cursor to move where there is no text in visual block mode
opt.wildmode = "longest:full,full" -- Command-line completion mode
opt.winminwidth = 5 -- Minimum window width
opt.wrap = false -- Disable line wrap
opt.fillchars = {
foldopen = "",
foldclose = "",
fold = " ",
foldsep = " ",
diff = "",
eob = " ",
}

152
lua/keymap.lua Normal file
View File

@ -0,0 +1,152 @@
return {
{
{ "i", "x", "n", "s" },
"<C-s>",
"<cmd>w<cr><esc>",
{ desc = "Save file" },
},
{
{ "n" },
"<C-t>",
"<cmd>enew<cr>",
{ desc = "New File" },
},
{
{ "n", "i" },
"<C-z>",
"<cmd>u<CR>",
{ desc = "Undo" },
},
{
{ "n", "i" },
"<C-y>",
"<cmd>redo<CR>",
{ desc = "Undo" },
},
{
{ "n", "i" },
"<S-tab>",
"<cmd><<CR>",
{ desc = "Remove Tab" },
},
{
{ "n", "i" },
"<C-g>",
"<cmd>Telescope<CR>",
{ desc = "Open Telescope" },
},
{
{ "n", "i" },
"<S-ScrollWheelUp>",
"<ScrollWheelLeft>",
{ desc = "Scroll sideways" },
},
{
{ "n", "i" },
"<S-ScrollWheelDown>",
"<ScrollWheelRight>",
{ desc = "Scroll sideways" },
},
{
{ "n" },
"<S-Tab>",
"<cmd>BufferPrevious<CR>",
{ desc = "Next Tab", silent = false },
},
{
{ "n" },
"<Tab>",
"<cmd>BufferNext<CR>",
{ desc = "Previous Tab", silent = false },
},
{
{ "n" },
"<C-w>",
"",
{ desc = "Disable STRG+w" },
},
{
{ "n" },
"<C-w>v",
"<cmd>vsplit<CR>",
{ desc = "Split Vertical", noremap = true },
},
{
{ "n" },
"<C-w>h",
"<cmd>split<CR>",
{ desc = "Split Horizontal", noremap = true },
},
{
{ "n" },
"q",
"<cmd>BufferClose<CR>",
{ desc = "Quit Buffer" },
},
{
{ "n" },
"<C-w>q",
"<cmd>quit<CR>",
{ desc = "Quit Window" },
},
{
{ "n" },
"<C-w><Left>",
"<cmd>wincmd h<CR>",
{ desc = "Window Left" },
},
{
{ "n" },
"<C-w><Down>",
"<cmd>wincmd j<CR>",
{ desc = "Window Down" },
},
{
{ "n" },
"<C-w><Up>",
"<cmd>wincmd k<CR>",
{ desc = "Window Up" },
},
{
{ "n" },
"<C-w><Right>",
"<cmd>wincmd l<CR>",
{ desc = "Window Right" },
},
{
{ "n", "i" },
"<C-b>",
"<cmd>NvimTreeToggle<CR>",
{ desc = "Toggle Neotree" },
},
{
{ "n" },
":",
"<cmd>Telescope cmdline<CR>",
{ noremap = true, desc = "Open Cmdline" },
},
{
{ "n" },
"<leader><leader>",
"<cmd>Telescope cmdline<CR>",
{ noremap = true, desc = "Open Cmdline" },
},
{
{ "v" },
"i",
"<esc>i",
{ noremap = true, desc = "Switch from Visual to Insert mode" },
},
{
{ "n" },
"<C-f>",
"<cmd>Telescope current_buffer_fuzzy_find<CR>",
{ noremap = true, desc = "Find" },
},
{
{ "n" },
"<S-f>",
"<cmd>lua vim.lsp.buf.format()<CR>",
{ noremap = true, desc = "Format active buffer" }
}
}

108
lua/options.lua Normal file
View File

@ -0,0 +1,108 @@
return {
-- global vim options
g = {
-- disable netrw
loaded_netrw = 1,
loaded_netrwPlugin = 1
},
vim = {
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
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
wrap = false,
foldcolumn = "1",
foldlevel = 99,
foldlevelstart = 99,
foldenable = true,
fillchars = {
foldopen = "",
foldclose = "",
fold = " ",
foldsep = " ",
diff = "",
eob = " ",
horiz = "",
horizup = "",
horizdown = "",
vert = "",
vertleft = "",
vertright = "",
verthoriz = "",
},
mousemoveevent = true,
laststatus = 3, -- global statusline
},
ui = {
theme = "catppuccin",
border = "rounded",
popup = {
width = 0.6,
height = 0.8,
},
},
lsp = {
icons = {
Error = "",
Warn = "",
Hint = "",
Info = "",
},
},
git = {
-- symbols used by gitsigns
signs = {
add = "",
change = "¦",
delete = "",
topdelete = "",
changedelete = "¦",
untracked = "",
},
icons = {
add = "+",
change = "~",
delete = "-",
},
},
lazy = {
install_missing = true,
icons = {
cmd = "",
config = "",
event = "",
ft = "",
init = "",
import = "",
keys = "",
lazy = "󰒲 ",
loaded = "",
not_loaded = "",
plugin = "",
runtime = "",
require = "󰢱 ",
source = "",
start = "",
task = "",
list = {
"",
"",
"",
"",
},
},
},
}

View File

@ -1,16 +0,0 @@
return {
"stevearc/aerial.nvim",
opts = {
attach_mode = "global",
backends = { "lsp", "treesitter", "markdown", "man" },
show_guides = false,
layout = {
resize_to_content = false,
win_opts = {
winhl = "Normal:NormalFloat,FloatBorder:NormalFloat,SignColumn:SignColumnSB",
signcolumn = "yes",
statuscolumn = " ",
},
}
}
}

46
lua/plugins/barbar.lua Normal file
View File

@ -0,0 +1,46 @@
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,
version = '^1.7.0',
opts = function()
local options = require("options")
return {
animation = true,
tabpages = true,
insert_at_end = true,
maximum_padding = 4,
sidebar_filetypes = {
NvimTree = true,
},
clickable = true,
pinned = {
button = "",
filename = true,
},
icons = {
separator = { left = "", right = "" },
diagnostics = {
[vim.diagnostic.severity.ERROR] = { enabled = true, icon = options.lsp.icons.Error },
[vim.diagnostic.severity.WARN] = { enabled = false, icon = options.lsp.icons.Warn },
[vim.diagnostic.severity.INFO] = { enabled = false, icon = options.lsp.icons.Info },
[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,19 +0,0 @@
return {
{
"utilyre/barbecue.nvim",
name = "barbecue",
version = "*",
dependencies = {
"SmiteshP/nvim-navic",
"nvim-tree/nvim-web-devicons", -- optional dependency
},
opts = {
exclude_filetypes = {
"netrw",
"toggleterm",
"neo-tree",
"outline"
},
},
}
}

View File

@ -23,6 +23,6 @@ return {
"lazyterm",
},
},
}
},
},
}

View File

@ -0,0 +1,25 @@
return {
{
"catppuccin/nvim",
name = "catppuccin",
priority = 1000,
opts = {
flavour = "macchiato",
no_underline = true,
integrations = {
cmp = true,
gitsigns = true,
nvimtree = true,
treesitter = true,
notify = true,
barbar = true,
dropbar = {
enabled = false,
color_mode = false, -- enable color for kind's texts, not just kind's icons
},
mason = true,
}
}
}
}

View File

@ -1,86 +0,0 @@
return {
{
"hrsh7th/nvim-cmp",
opts = function()
vim.api.nvim_set_hl(0, "CmpGhostText", { link = "Comment", default = true })
local cmp = require("cmp")
local defaults = require("cmp.config.default")()
return {
window = {
completion = {
border = "rounded",
scrollbar = false,
winhighlight = "Normal:CmpPmenu,FloatBorder:CmpPmenu,Search:None"
},
documentation = {
border = "rounded",
scrollbar = false,
winhighlight = "Normal:CmpPmenu,FloatBorder:CmpPmenu,Search:None"
},
},
completion = {
completeopt = "menu,menuone,noinsert",
},
snippet = {
expand = function(args)
require("luasnip").lsp_expand(args.body)
end,
},
mapping = cmp.mapping.preset.insert({
["<C-n>"] = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Insert }),
["<C-p>"] = cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Insert }),
["<C-b>"] = cmp.mapping.scroll_docs(-4),
["<C-f>"] = cmp.mapping.scroll_docs(4),
["<C-Space>"] = cmp.mapping.complete(),
["<C-e>"] = cmp.mapping.abort(),
["<CR>"] = cmp.mapping.confirm({ select = true }),
["<S-CR>"] = cmp.mapping.confirm({
behavior = cmp.ConfirmBehavior.Replace,
select = true,
}),
["<C-CR>"] = function(fallback)
cmp.abort()
fallback()
end,
}),
sources = cmp.config.sources({
{ name = "nvim_lsp" },
{ name = 'nvim_lsp_signature_help' },
{ name = "luasnip" },
{ name = "path" },
}, {
{ name = "buffer" },
}),
formatting = {
fields = {
"kind",
"abbr",
"menu"
},
format = function(_, item)
item.menu = item.kind
local icons = require("lazyvim.config").icons.kinds
if icons[item.kind] then
item.kind = icons[item.kind]
end
return item
end,
},
experimental = {
ghost_text = {
hl_group = "CmpGhostText",
}
},
sorting = defaults.sorting,
}
end,
dependencies = {
"hrsh7th/cmp-nvim-lsp",
"hrsh7th/cmp-buffer",
"hrsh7th/cmp-path",
"hrsh7th/cmp-path",
"hrsh7th/cmp-nvim-lsp-signature-help",
"saadparwaiz1/cmp_luasnip",
}
}
}

View File

@ -1,103 +0,0 @@
return {
{
"willothy/nvim-cokeline",
config = true,
opts = {
show_if_buffers_are_at_least = 1,
buffers = {
focus_on_delete = "next",
new_buffers_position = 'last',
},
mappings = {
disable_mouse = false,
},
default_hl = {
bg = function(buffer)
if buffer.is_focused then
return "Normal"
end
return "TabLine"
end,
fg = function(buffer)
if buffer.is_focused then
return "Normal"
end
return "TabLine"
end,
bold = function(buffer)
return buffer.is_focused
end,
},
components = {
{
text = function(buffer)
if buffer.is_focused then
return ""
end
return " "
end,
fg = "Normal"
},
{
text = function(buffer)
if buffer.is_modified then
return ''
elseif buffer.is_readonly then
return ''
else
return ' '
end
end
},
{
text = function(buffer) return buffer.devicon.icon end,
fg = function(buffer) return buffer.devicon.color end,
},
{
text = function(buffer) return ' ' .. buffer.filename .. ' ' end,
},
{
text = '󰅖',
on_click = function(_, _, _, _, buffer)
buffer:delete()
end
},
{
text = ' ',
}
},
tabs = {
placement = "right",
components = {
{
text = function(tabpage)
return ' ' .. tabpage.number .. ' '
end,
bg = function(tabpage)
if tabpage.is_active then
return "NormalNC"
end
return "TabLine"
end,
fg = function(tabpage)
if tabpage.is_active then
return "NormalNC"
end
return "TabLine"
end,
bold = true
},
},
},
sidebar = {
filetype = { "NvimTree", "neo-tree", "SidebarNvim" },
components = {
{
text = "",
bg = "ColorColumn"
}
},
},
}
}
}

View File

@ -1,119 +1,94 @@
local logo = [[
__ _ _
/\ \ \_ _| | ____ ___ _(_)_ __ ___
/ \/ / | | | |/ / _` \ \ / / | '_ ` _ \
/ /\ /| |_| | < (_| |\ V /| | | | | | |
\_\ \/ \__,_|_|\_\__,_| \_/ |_|_| |_| |_|
]]
logo = string.rep("\n", 8) .. logo .. "\n\n"
return {
{
"nvimdev/dashboard-nvim",
event = "VimEnter",
opts = function()
local logo = [[
]]
logo = string.rep("\n", 8) .. logo .. "\n\n"
local opts = {
config = function()
require("dashboard").setup({
theme = "doom",
shortcut_type = "letter",
hide = {
-- this is taken care of by lualine
-- enabling this messes up the actual laststatus setting after loading a file
statusline = false,
tabline = true,
winbar = true
statusline = true, -- hide statusline default is true
tabline = true, -- hide the tabline
winbar = true, -- hide winbar
},
config = {
header = vim.split(logo, "\n"),
-- stylua: ignore
center = {
{
action = "Telescope find_files",
desc = " Find file",
icon =
"",
key =
"f"
desc = " Find File",
icon = "",
key = "f",
},
{
action = "ene | startinsert",
desc = " New file",
icon =
"",
key =
"n"
desc = " New File",
icon = "",
key = "n",
},
{
action = "Telescope oldfiles",
desc = " Recent files",
icon =
"",
key =
"r"
desc = " Recent Files",
icon = "",
key = "r",
},
{
action = [[lua require("lazyvim.util").telescope.config_files()()]],
action = "Telescope live_grep",
desc = " Find Text",
icon = "",
key = "g",
},
{
action = [[lua vim.cmd("cd ~/.config/nvim/") vim.cmd("Telescope fd")]],
desc = " Config",
icon =
"",
key =
"c"
icon = "",
key = "c",
},
{
action = 'lua require("persistence").load()',
desc = " Restore Session",
icon =
"",
key =
"s"
icon = "",
key = "s",
},
{
action = "Lazy",
desc = " Lazy",
icon =
"󰒲 ",
key =
"l"
icon = "󰒲 ",
key = "l",
},
{
action = "Mason",
desc = " Language Server & Formatter",
icon = "",
key = "m",
},
{
action = "qa",
desc = " Quit",
icon =
"",
key =
"q"
icon = "",
key = "q",
},
},
footer = function()
local stats = require("lazy").stats()
local ms = (math.floor(stats.startuptime * 100 + 0.5) / 100)
return { "⚡ Neovim loaded " ..
stats.loaded .. "/" .. stats.count .. " plugins in " .. ms .. "ms" }
return {
"- loaded " .. stats.loaded .. "/" .. stats.count .. " plugins -",
}
end,
},
}
for _, button in ipairs(opts.config.center) do
button.desc = button.desc .. string.rep(" ", 43 - #button.desc)
button.key_format = " %s"
end
-- close Lazy and re-open when the dashboard is ready
if vim.o.filetype == "lazy" then
vim.cmd.close()
vim.api.nvim_create_autocmd("User", {
pattern = "DashboardLoaded",
callback = function()
require("lazy").show()
end,
})
end
return opts
})
end,
}
dependencies = { { "nvim-tree/nvim-web-devicons" } },
},
}

5
lua/plugins/diffview.lua Normal file
View File

@ -0,0 +1,5 @@
return {
{
"sindrets/diffview.nvim",
}
}

View File

@ -1,42 +1,22 @@
return {
{
"stevearc/dressing.nvim",
opts = {
input = {
enabled = true,
-- When true, <Esc> will close the modal
insert_only = true,
-- These are passed to nvim_open_win
border = "rounded",
-- 'editor' and 'win' will default to being centered
relative = "cursor",
mappings = {
n = {
["<Esc>"] = "Close",
["<CR>"] = "Confirm",
},
i = {
["<C-c>"] = "Close",
["<CR>"] = "Confirm",
["<Up>"] = "HistoryPrev",
["<Down>"] = "HistoryNext",
},
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 = {
-- Set to false to disable the vim.ui.select implementation
enabled = true,
nui = {
border = {
style = "rounded",
},
select = {
backend = { "telescope" }
}
},
builtin = {
border = "rounded",
-- 'editor' and 'win' will default to being centered
relative = "editor",
}
}
}
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

@ -1,19 +1,22 @@
return {
{
"lewis6991/gitsigns.nvim",
opts = {
signs = {
add = { text = "" },
change = { text = "" },
delete = { text = "" },
topdelete = { text = "" },
changedelete = { text = "" },
untracked = { text = "" },
},
signcolumn = true,
preview_config = {
border = 'single'
opts = function()
local options = require("options")
return {
signs = {
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 = options.ui.border,
},
}
}
}
end,
},
}

View File

@ -0,0 +1,8 @@
return {
{
"RRethy/vim-illuminate",
config = function(_, _)
require("illuminate").configure({})
end,
},
}

18
lua/plugins/lens.lua Normal file
View File

@ -0,0 +1,18 @@
return {
{
"VidocqH/lsp-lens.nvim",
config = function()
vim.api.nvim_set_hl(0, 'LspLens', { link = 'NonText', default = true })
require("lsp-lens").setup({
enable = true,
sections = {
definition = false,
references = true,
implements = true,
git_authors = true,
},
})
vim.api.nvim_set_hl(0, 'LspLens', { link = 'NonText', default = true })
end,
},
}

67
lua/plugins/lsp.lua Normal file
View File

@ -0,0 +1,67 @@
return {
{
"neovim/nvim-lspconfig",
dependencies = {
"williamboman/mason.nvim",
"williamboman/mason-lspconfig.nvim",
},
priority = 500,
opts = {
diagnostics = {
underline = true,
update_in_insert = true,
virtual_text = {
spacing = 4,
source = "if_many",
prefix = "",
},
severity_sort = true,
signs = {
text = {
[vim.diagnostic.severity.ERROR] = require("options").lsp.icons.Error,
[vim.diagnostic.severity.WARN] = require("options").lsp.icons.Warn,
[vim.diagnostic.severity.HINT] = require("options").lsp.icons.Hint,
[vim.diagnostic.severity.INFO] = require("options").lsp.icons.Info,
},
},
},
},
config = function(_, opts)
local options = require("options")
require("mason").setup()
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({
on_attach = function(client, bufnr)
end
})
end,
}
require("mason-lspconfig").setup({ handlers = handlers })
-- set custom icons
for name, icon in pairs(options.lsp.icons) do
name = "DiagnosticSign" .. name
vim.fn.sign_define(name, { text = icon, texthl = name, numhl = "" })
end
vim.diagnostic.config(vim.deepcopy(opts.diagnostics))
require("lspconfig").gdscript.setup({})
end,
},
{
"jinzhongjia/LspUI.nvim",
branch = "main",
config = function()
require("LspUI").setup({
})
end
}
}

View File

@ -1,173 +0,0 @@
return {
{
"neovim/nvim-lspconfig",
dependencies = {
"williamboman/mason.nvim",
"williamboman/mason-lspconfig.nvim"
},
---@class PluginLspOpts
opts = {
-- options for vim.diagnostic.config()
diagnostics = {
underline = true,
update_in_insert = true,
virtual_text = {
spacing = 4,
source = "if_many",
prefix = "",
},
severity_sort = true,
float = {
border = "rounded"
}
},
-- Enable this to enable the builtin LSP inlay hints on Neovim >= 0.10.0
-- Be aware that you also will need to properly configure your LSP server to
-- provide the inlay hints.
inlay_hints = {
enabled = false,
},
-- add any global capabilities here
capabilities = {},
-- options for vim.lsp.buf.format
-- `bufnr` and `filter` is handled by the LazyVim formatter,
-- but can be also overridden when specified
format = {
formatting_options = nil,
timeout_ms = nil,
},
servers = {
lua_ls = {
mason = false
},
rust_analyzer = {
mason = false
},
},
setup = {
}
},
---@param opts PluginLspOpts
config = function(_, opts)
local Util = require("lazyvim.util")
if Util.has("neoconf.nvim") then
local plugin = require("lazy.core.config").spec.plugins["neoconf.nvim"]
require("neoconf").setup(require("lazy.core.plugin").values(plugin, "opts", false))
end
-- setup autoformat
Util.format.register(Util.lsp.formatter())
-- deprectaed options
if opts.autoformat ~= nil then
vim.g.autoformat = opts.autoformat
Util.deprecate("nvim-lspconfig.opts.autoformat", "vim.g.autoformat")
end
-- setup keymaps
Util.lsp.on_attach(function(client, buffer)
require("lazyvim.plugins.lsp.keymaps").on_attach(client, buffer)
end)
local register_capability = vim.lsp.handlers["client/registerCapability"]
vim.lsp.handlers["client/registerCapability"] = function(err, res, ctx)
local ret = register_capability(err, res, ctx)
local client_id = ctx.client_id
---@type lsp.Client
local client = vim.lsp.get_client_by_id(client_id)
local buffer = vim.api.nvim_get_current_buf()
require("lazyvim.plugins.lsp.keymaps").on_attach(client, buffer)
return ret
end
-- diagnostics
for name, icon in pairs(require("lazyvim.config").icons.diagnostics) do
name = "DiagnosticSign" .. name
vim.fn.sign_define(name, { text = icon, texthl = name, numhl = "" })
end
local inlay_hint = vim.lsp.buf.inlay_hint or vim.lsp.inlay_hint
if opts.inlay_hints.enabled and inlay_hint then
Util.lsp.on_attach(function(client, buffer)
if client.supports_method("textDocument/inlayHint") then
inlay_hint(buffer, true)
end
end)
end
if type(opts.diagnostics.virtual_text) == "table" and opts.diagnostics.virtual_text.prefix == "icons" then
opts.diagnostics.virtual_text.prefix = vim.fn.has("nvim-0.10.0") == 0 and ""
or function(diagnostic)
local icons = require("lazyvim.config").icons.diagnostics
for d, icon in pairs(icons) do
if diagnostic.severity == vim.diagnostic.severity[d:upper()] then
return icon
end
end
end
end
vim.diagnostic.config(vim.deepcopy(opts.diagnostics))
local servers = opts.servers
local has_cmp, cmp_nvim_lsp = pcall(require, "cmp_nvim_lsp")
local capabilities = vim.tbl_deep_extend(
"force",
{},
vim.lsp.protocol.make_client_capabilities(),
has_cmp and cmp_nvim_lsp.default_capabilities() or {},
opts.capabilities or {}
)
local function setup(server)
local server_opts = vim.tbl_deep_extend("force", {
capabilities = vim.deepcopy(capabilities),
}, servers[server] or {})
if opts.setup[server] then
if opts.setup[server](server, server_opts) then
return
end
elseif opts.setup["*"] then
if opts.setup["*"](server, server_opts) then
return
end
end
require("lspconfig")[server].setup(server_opts)
end
-- get all the servers that are available through mason-lspconfig
local have_mason, mlsp = pcall(require, "mason-lspconfig")
local all_mslp_servers = {}
if have_mason then
all_mslp_servers = vim.tbl_keys(require("mason-lspconfig.mappings.server").lspconfig_to_package)
end
local ensure_installed = {} ---@type string[]
for server, server_opts in pairs(servers) do
if server_opts then
server_opts = server_opts == true and {} or server_opts
if server_opts.mason == false or not vim.tbl_contains(all_mslp_servers, server) then
setup(server)
else
ensure_installed[#ensure_installed + 1] = server
end
end
end
if have_mason then
mlsp.setup({ ensure_installed = ensure_installed, handlers = { setup } })
end
if Util.lsp.get_config("denols") and Util.lsp.get_config("tsserver") then
local is_deno = require("lspconfig.util").root_pattern("deno.json", "deno.jsonc")
Util.lsp.disable("tsserver", is_deno)
Util.lsp.disable("denols", function(root_dir)
return not is_deno(root_dir)
end)
end
end,
}
}

View File

@ -1,114 +1,185 @@
local icons = require("lazyvim.config").icons
return {
{
"nvim-lualine/lualine.nvim",
opts = {
options = {
theme = 'auto',
icons_enabled = true,
globalstatus = true,
section_separators = { left = '', right = '' },
component_separators = { left = ' ', right = ' ' },
disabled_filetypes = {
statusline = {
'help',
'startify',
'dashboard',
'qf',
},
winbar = {
'help',
'startify',
'dashboard',
'packer',
'neogitstatus',
'NvimTree',
'neo-tree',
'Trouble',
'alpha',
'lir',
'Outline',
'spectre_panel',
'toggleterm',
'qf',
}
opts = function()
local options = require("options")
return {
options = {
theme = options.ui.theme,
component_separators = { left = "", right = "" },
section_separators = { left = "", right = "" },
globalstatus = true,
},
},
sections = {
lualine_a = { 'mode' },
lualine_b = {
{
'branch',
on_click = function(_, _)
vim.defer_fn(function()
vim.cmd("LazyGit")
end, 100)
end
}
},
lualine_c = {
{
'diff',
symbols = {
added = '+',
modified = '~',
removed = '-',
sections = {
lualine_a = {
{
function()
return ""
end,
separator = { left = "", right = "" },
padding = 1,
fmt = function(text)
return string.gsub(text, "%s+", "")
end,
},
colored = true,
on_click = function(_, _)
vim.defer_fn(function()
vim.cmd("Gitsigns diffthis")
end, 100)
end
},
{
"diagnostics",
sources = { 'nvim_diagnostic' },
symbols = {
error = icons.diagnostics.Error,
warn = icons.diagnostics.Warn,
info = icons.diagnostics.Info,
hint = icons.diagnostics.Hint,
{
"mode",
padding = 0,
fmt = function(text)
return string.gsub(text, "%s+", "") .. " "
end,
},
colored = true,
on_click = function(_, _)
require("trouble").toggle({ mode = "document_diagnostics" })
end
},
{
'filename',
file_status = true,
path = 0,
symbols = {
modified = '[+]', -- Text to show when the file is modified.
readonly = '[-]', -- Text to show when the file is non-modifiable or readonly.
unnamed = '[No Name]', -- Text to show for unnamed buffers.
newfile = '[New]', -- Text to show for newly created file before first write
lualine_b = {
{
function()
return ''
end,
padding = 0,
on_click = function()
vim.defer_fn(function()
vim.cmd("ToggleTerm direction=horizontal")
end, 100)
end
},
{
function()
return ' 󰒲 '
end,
padding = 0,
on_click = function()
vim.defer_fn(function()
vim.cmd("Lazy")
end, 100)
end
},
{
function()
return ''
end,
padding = 0,
on_click = function()
vim.defer_fn(function()
vim.cmd("Mason")
end, 100)
end
},
{
function()
return ' 󰛖 '
end,
padding = 0,
on_click = function()
vim.defer_fn(
function()
vim.lsp.buf.format()
end, 100
)
end
}
},
lualine_c = {
{
"branch",
icon = "󰊤",
on_click = function()
vim.defer_fn(function()
vim.cmd("Telescope git_branches")
end, 100)
end,
},
{
"diff",
symbols = {
added = "+",
modified = "~",
removed = "-",
},
on_click = function()
vim.defer_fn(function()
vim.cmd("Gitsigns diffthis")
end, 100)
end,
},
{
"diagnostics",
symbols = {
error = options.lsp.icons.Error,
warn = options.lsp.icons.Warn,
info = options.lsp.icons.Info,
hint = options.lsp.icons.Hint,
},
sources = {
"nvim_diagnostic",
},
update_in_insert = true,
on_click = function()
vim.defer_fn(function()
vim.cmd("TroubleToggle")
end, 100)
end,
},
'%=',
{
"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
},
},
},
lualine_x = {
{
function()
local client_id = vim.lsp.get_client_by_id(1)
return "" .. client_id.name
end,
on_click = function()
vim.defer_fn(function()
vim.cmd("LspInfo")
end, 100)
end,
color = "lualine_c_inactive",
},
{
"filetype",
colored = true,
on_click = function(_, _)
vim.defer_fn(function()
vim.cmd("Telescope filetypes")
end, 100)
end,
},
"encoding",
"fileformat",
},
lualine_y = {
{ "progress" },
},
lualine_z = { "location" },
},
lualine_x = {
'encoding',
'fileformat',
{
'filetype',
colored = true,
on_click = function(_, _)
vim.defer_fn(function()
vim.cmd("Telescope filetypes")
end, 100)
end
}
inactive_sections = {
lualine_a = {},
lualine_b = {},
lualine_c = {
{
"filename",
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_x = { "location" },
lualine_y = {},
lualine_z = {},
},
lualine_y = { 'progress' },
lualine_z = { 'location' },
},
},
dependencies = {
'nvim-tree/nvim-web-devicons',
"SmiteshP/nvim-navic",
'kdheepak/lazygit.nvim'
}
}
end,
},
}

View File

@ -1,10 +0,0 @@
return {
{
"L3MON4D3/LuaSnip",
opts = {
history = true,
delete_check_events = "TextChanged",
}
}
}

View File

@ -1,10 +1,40 @@
return {
{
'echasnovski/mini.nvim',
version = '*',
config = function()
require("mini.pairs").setup()
require("mini.clue").setup()
end
"echasnovski/mini.clue", -- show next key clue
version = false,
opts = {
window = {
delay = 200,
},
triggers = {
{ mode = "n", keys = "<Leader>" },
{ mode = "n", keys = "<C-w>" },
},
},
},
{
"echasnovski/mini.pairs",
version = false,
event = "VeryLazy",
config = function(_, opts)
require("mini.pairs").setup(opts)
end,
},
{
"echasnovski/mini.move",
version = false,
opts = {
mappings = {
left = "<C-S-Left>",
right = "<C-S-Right>",
up = "<C-S-Up>",
down = "<C-S-Down>",
line_left = "<C-S-Left>",
line_right = "<C-S-Right>",
line_down = "<C-S-Down>",
line_up = "<C-S-Up>",
},
},
}
}

View File

@ -1,23 +0,0 @@
return {
{
"SmiteshP/nvim-navic",
lazy = true,
init = function()
vim.g.navic_silence = true
require("lazyvim.util").lsp.on_attach(function(client, buffer)
if client.supports_method("textDocument/documentSymbol") then
require("nvim-navic").attach(client, buffer)
end
end)
end,
opts = function()
return {
separator = " ",
highlight = true,
depth_limit = 5,
icons = require("lazyvim.config").icons.kinds,
lazy_update_context = true,
}
end,
}
}

View File

@ -2,34 +2,33 @@ return {
{
"folke/noice.nvim",
event = "VeryLazy",
opts = {
lsp = {
override = {
["vim.lsp.util.convert_input_to_markdown_lines"] = true,
["vim.lsp.util.stylize_markdown"] = true,
["cmp.entry.get_documentation"] = true,
},
},
routes = {
{
filter = {
event = "msg_show",
any = {
{ find = "%d+L, %d+B" },
{ find = "; after #%d+" },
{ find = "; before #%d+" },
dependencies = {
"MunifTanjim/nui.nvim", -- gui component library
},
opts = function(_, _)
return {
cmdline = {
enabled = true,
format = {
cmdline = {
pattern = "^:",
icon = "",
lang = "vim",
},
},
opts = {
win_options = {
winhighlight = {
FloatBorder = "LspInfoBorder",
},
},
position = {
row = 5,
col = "50%",
},
},
view = "mini",
},
},
presets = {
bottom_search = true,
command_palette = true,
long_message_to_split = true,
inc_rename = true,
lsp_doc_border = true,
},
},
}
}
end,
},
}

8
lua/plugins/notify.lua Normal file
View File

@ -0,0 +1,8 @@
return {
{
"rcarriga/nvim-notify",
opts = {
render = "wrapped-compact",
},
},
}

View File

@ -1,6 +0,0 @@
return {
{
"MunifTanjim/nui.nvim",
lazy = true,
}
}

View File

@ -1,35 +0,0 @@
return {
{
"rcarriga/nvim-notify",
keys = {
{
"<leader>un",
function()
require("notify").dismiss({ silent = true, pending = true })
end,
desc = "Dismiss all Notifications",
},
},
opts = {
timeout = 3000,
max_height = function()
return math.floor(vim.o.lines * 0.75)
end,
max_width = function()
return math.floor(vim.o.columns * 0.75)
end,
on_open = function(win)
vim.api.nvim_win_set_config(win, { zindex = 100 })
end,
},
init = function()
local Util = require("lazyvim.util")
-- when noice is not enabled, install notify on VeryLazy
if not Util.has("noice.nvim") then
Util.on_very_lazy(function()
vim.notify = require("notify")
end)
end
end,
}
}

View File

@ -1,17 +0,0 @@
return {
{
"dstein64/nvim-scrollview",
opts = {
excluded_filetypes = {
'dashboard',
'neo-tree',
'aerial'
},
signs_on_startup = {
'conflicts',
'search',
'cursor'
},
}
}
}

View File

@ -3,39 +3,38 @@ return {
"nvim-tree/nvim-tree.lua",
opts = {
hijack_cursor = true,
sync_root_with_cwd = true,
renderer = {
indent_markers = {
enable = false
},
icons = {
show = {
file = true,
folder = true,
folder_arrow = true,
git = true,
},
}
},
sync_root_with_cwd = false,
diagnostics = {
enable = true,
show_on_dirs = false,
show_on_dirs = true,
show_on_open_dirs = false,
},
actions = {
change_dir = {
enable = false,
restrict_above_cwd = true,
},
open_file = {
resize_window = false,
window_picker = {
chars = "aoeui",
update_focused_file = {
enable = true,
update_root = false,
ignore_list = { "help" },
},
modified = {
enable = true,
},
hijack_directories = {
enable = true,
},
renderer = {
highlight_git = true,
icons = {
git_placement = "after",
diagnostics_placement = "after",
modified_placement = "after",
show = {
git = false,
},
},
remove_file = {
close_window = false,
},
},
}
}
view = {
signcolumn = "no",
width = 30,
},
},
},
}

View File

@ -1,25 +0,0 @@
return {
{
"kevinhwang91/nvim-ufo",
event = {
"InsertEnter"
},
dependencies = {
"kevinhwang91/promise-async"
},
opts = {
preview = {
mappings = {
scrollB = "<C-b>",
scrollF = "<C-f>",
scrollU = "<C-u>",
scrollD = "<C-d>",
},
},
-- register treesitter as source for scopes
provider_selector = function(_, _, _)
return { 'treesitter', 'indent' }
end
}
}
}

20
lua/plugins/onedark.lua Normal file
View File

@ -0,0 +1,20 @@
return {
{
'olimorris/onedarkpro.nvim',
lazy = false,
priority = 1000,
opts = {
plugins = {
treesitter = true,
nvim_lsp = true,
nvim_tree = true,
barbar = true,
trouble = true,
diffview = true,
},
options = {
cursorline = true
}
}
}
}

View File

@ -1,6 +0,0 @@
return {
{
'nvim-lua/plenary.nvim'
}
}

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,16 +0,0 @@
return {
{
"mrjones2014/smart-splits.nvim",
opts = {
ignored_filetypes = {
"nofile",
"quickfix",
"qf",
"prompt"
},
ignored_buftypes = {
"nofile"
}
},
}
}

View File

@ -1,6 +1,11 @@
return {
{
"luukvbaal/statuscol.nvim",
lazy = true,
event = {
"BufEnter",
"LspAttach"
},
config = function()
local builtin = require("statuscol.builtin")
require("statuscol").setup({
@ -9,35 +14,36 @@ return {
"toggleterm",
"dashboard",
"aerial",
"zsh",
"NvimTree",
},
segments = {
-- diagnostic signs
{
sign = {
name = { "Diagnostic" },
colwidth = 2,
maxwidth = 1,
condition = { true }
},
click = "v:lua.ScSa"
},
-- line numbers
{
text = { builtin.lnumfunc, " " },
click = "v:lua.ScLa",
},
-- folds
{
text = { builtin.foldfunc },
click = "v:lua.ScFa"
click = "v:lua.ScFa",
},
-- diagnostic signs
{
sign = {
namespace = { "Diagnostic" },
colwidth = 2,
},
auto = true,
click = "v:lua.ScSa",
},
-- line numbers
{
text = { builtin.lnumfunc },
click = "v:lua.ScLa",
},
-- git signs
{
sign = { namespace = { "gitsigns" } },
click = "v:lua.ScSa"
sign = { namespace = { "gitsigns" }, maxwidth = 1, },
click = "v:lua.ScSa",
}
}
},
})
end,
}
},
}

View File

@ -1,28 +1,36 @@
return {
{
"nvim-telescope/telescope.nvim",
opts = {
defaults = {
layout_strategy = "horizontal",
layout_config = { prompt_position = "top" },
sorting_strategy = "ascending",
winblend = 0,
},
extensions = {
aerial = {
-- Display symbols as <root>.<parent>.<symbol>
show_nesting = {
["_"] = false, -- This key will be the default
json = true, -- You can set the option for specific filetypes
yaml = true,
},
},
},
},
dependencies = {
"sharkdp/fd",
"nvim-lua/plenary.nvim",
'nvim-tree/nvim-web-devicons'
"nvim-tree/nvim-web-devicons",
-- extensionsdiff
"jonarrien/telescope-cmdline.nvim",
"debugloop/telescope-undo.nvim",
},
tag = "0.1.6",
opts = {
defaults = {
layout_strategy = "horizontal",
layout_config = {
prompt_position = "top",
},
sorting_strategy = "ascending",
winblend = 0,
theme = "dropdown",
},
extensions = {
cmdline = {},
undo = {},
},
},
config = function(_, opts)
require("telescope").setup(opts)
require("telescope").load_extension("cmdline")
require("telescope").load_extension("undo")
end,
},
}

View File

@ -1,15 +1,16 @@
return {
{
"akinsho/toggleterm.nvim",
version = "*",
opts = {
open_mapping = '<F7>',
start_in_insert = true,
direction = 'float',
hide_numbers = true,
shade_terminals = true,
shading_factor = -30,
float_opts = {
border = 'curved',
border = "single",
winblend = 0
},
},
},
persist_mode = true,
start_in_insert = true,
}
}
}

View File

@ -1,20 +0,0 @@
return {
{
"folke/todo-comments.nvim",
dependencies = { "nvim-lua/plenary.nvim" },
cmd = { "TodoTrouble", "TodoTelescope" },
config = true,
keys = {
{ "]t", function() require("todo-comments").jump_next() end, desc = "Next todo comment" },
{ "[t", function() require("todo-comments").jump_prev() end, desc = "Previous todo comment" },
{ "<leader>xt", "<cmd>TodoTrouble<cr>", desc = "Todo (Trouble)" },
{ "<leader>xT", "<cmd>TodoTrouble keywords=TODO,FIX,FIXME<cr>", desc = "Todo/Fix/Fixme (Trouble)" },
{ "<leader>st", "<cmd>TodoTelescope<cr>", desc = "Todo" },
{ "<leader>sT", "<cmd>TodoTelescope keywords=TODO,FIX,FIXME<cr>", desc = "Todo/Fix/Fixme" },
},
ops = {
signs = true,
sign_priority = 8, -- sign priority
}
}
}

7
lua/plugins/todo.lua Normal file
View File

@ -0,0 +1,7 @@
return {
{
"folke/todo-comments.nvim",
dependencies = { "nvim-lua/plenary.nvim" },
opts = {},
},
}

View File

@ -1,23 +0,0 @@
return {
{
"folke/tokyonight.nvim",
lazy = true,
priority = 1000,
opts = {
style = "night",
transparent = false,
styles = {
sidebars = "dark",
floats = "normal",
},
sidebars = { "qf", "trouble", "neo-tree", "aerial", "help" },
},
},
-- Configure LazyVim to load tokyonight
{
"LazyVim/LazyVim",
opts = {
colorscheme = "tokyonight",
},
}
}

View File

@ -1,59 +1,39 @@
return {
{
"nvim-treesitter/nvim-treesitter",
version = false, -- last release is way too old and doesn't work on Windows
build = ":TSUpdate",
event = {
"VeryLazy",
},
dependencies = {
"nvim-treesitter/nvim-treesitter-textobjects",
},
cmd = {
"TSUpdateSync",
"TSUpdate",
"TSInstall"
},
init = function(plugin)
-- PERF: add nvim-treesitter queries to the rtp and it's custom query predicates early
-- This is needed because a bunch of plugins no longer `require("nvim-treesitter")`, which
-- no longer trigger the **nvim-treeitter** module to be loaded in time.
-- Luckily, the only thins that those plugins need are the custom queries, which we make available
-- during startup.
require("lazy.core.loader").add_to_rtp(plugin)
require("nvim-treesitter.query_predicates")
end,
opts = {
autotag = {
enable = true
},
auto_install = true,
highlight = {
enable = true
enable = true,
disable = function(_, buf)
local max_filesize = 1000 * 1024 -- 1 MB
local ok, stats = pcall(vim.loop.fs_stat, vim.api.nvim_buf_get_name(buf))
if ok and stats and stats.size > max_filesize then
return true
end
end,
},
indent = {
enable = true
},
ensure_installed = {
"bash",
"c",
"diff",
"html",
"javascript",
"jsdoc",
"json",
"jsonc",
"lua",
"luadoc",
"luap",
"markdown",
"markdown_inline",
"python",
"query",
"regex",
"toml",
"tsx",
"typescript",
"vim",
"vimdoc",
"xml",
"yaml",
},
incremental_selection = {
enable = true,
keymaps = {
init_selection = "<C-space>",
node_incremental = "<C-space>",
scope_incremental = false,
node_decremental = "<bs>",
},
},
autotag = {
enable = true,
},
textobjects = {
move = {
@ -66,18 +46,7 @@ return {
},
},
config = function(_, opts)
if type(opts.ensure_installed) == "table" then
---@type table<string, boolean>
local added = {}
opts.ensure_installed = vim.tbl_filter(function(lang)
if added[lang] then
return false
end
added[lang] = true
return true
end, opts.ensure_installed)
end
require("nvim-treesitter.configs").setup(opts)
end,
}
},
}

View File

@ -1,9 +1,19 @@
return {
{
"folke/trouble.nvim",
opts = {
use_diagnostic_signs = true,
"folke/trouble.nvim",
dependencies = { "nvim-tree/nvim-web-devicons" },
opts = function(_)
local options = require("options")
return {
padding = false,
indent_lines = false,
},
}
auto_jump = {},
signs = {
error = options.lsp.icons.Error,
warning = options.lsp.icons.Warn,
hint = options.lsp.icons.Hint,
information = options.lsp.icons.Info,
other = options.lsp.icons.Info,
},
}
end,
}

View File

@ -2,24 +2,16 @@ return {
{
"kevinhwang91/nvim-ufo",
event = {
"InsertEnter"
"LspAttach",
},
dependencies = {
"kevinhwang91/promise-async"
"kevinhwang91/promise-async",
},
opts = {
preview = {
mappings = {
scrollB = "<C-b>",
scrollF = "<C-f>",
scrollU = "<C-u>",
scrollD = "<C-d>",
},
},
-- register treesitter as source for scopes
provider_selector = function(_, _, _)
return { 'treesitter', 'indent' }
end
}
}
return { "treesitter", "indent" }
end,
},
},
}

View File

@ -1,5 +0,0 @@
return {
{
"tpope/vim-fugitive",
}
}

View File

@ -1,33 +0,0 @@
return {
{
"RRethy/vim-illuminate",
opts = {
delay = 200,
large_file_cutoff = 2000,
large_file_overrides = {
providers = { "lsp" },
},
},
config = function(_, opts)
require("illuminate").configure(opts)
local function map(key, dir, buffer)
vim.keymap.set("n", key, function()
require("illuminate")["goto_" .. dir .. "_reference"](false)
end, { desc = dir:sub(1, 1):upper() .. dir:sub(2) .. " Reference", buffer = buffer })
end
map("]]", "next")
map("[[", "prev")
-- also set it after loading ftplugins, since a lot overwrite [[ and ]]
vim.api.nvim_create_autocmd("FileType", {
callback = function()
local buffer = vim.api.nvim_get_current_buf()
map("]]", "next", buffer)
map("[[", "prev", buffer)
end,
})
end,
}
}

22
lua/plugins/vscode.lua Normal file
View File

@ -0,0 +1,22 @@
return {
{
"Mofiqul/vscode.nvim",
lazy = false,
priority = 1000,
config = function()
local colors = require('vscode.colors').get_colors()
require('vscode').setup({
color_overrides = {},
group_overrides = {
DiffDelete = {
fg = "#5A5A5A", bg = "#1f1f1f",
},
Pmenu = {
fg = colors.vscFront,
bg = colors.vscBack
}
}
})
end
},
}

View File

@ -1,32 +0,0 @@
return {
{
"folke/which-key.nvim",
event = "VeryLazy",
opts = {
plugins = { spelling = true },
defaults = {
mode = { "n", "v" },
["g"] = { name = "+goto" },
["gs"] = { name = "+surround" },
["]"] = { name = "+next" },
["["] = { name = "+prev" },
["<leader><tab>"] = { name = "+tabs" },
["<leader>b"] = { name = "+buffer" },
["<leader>c"] = { name = "+code" },
["<leader>f"] = { name = "+file/find" },
["<leader>g"] = { name = "+git" },
["<leader>gh"] = { name = "+hunks" },
["<leader>q"] = { name = "+quit/session" },
["<leader>s"] = { name = "+search" },
["<leader>u"] = { name = "+ui" },
["<leader>w"] = { name = "+windows" },
["<leader>x"] = { name = "+diagnostics/quickfix" },
},
},
config = function(_, opts)
local wk = require("which-key")
wk.setup(opts)
wk.register(opts.defaults)
end,
}
}

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

@ -0,0 +1,11 @@
return {
{
"nvim-zh/colorful-winsep.nvim",
config = true,
event = { "WinLeave" },
opts = {
smooth = true,
exponential_smoothing = false
}
}
}

View File

@ -2,19 +2,19 @@
printf "Continue copying files and removing current for Neovim (y/n)? "
read -r choice
case "$choice" in
y|Y )
echo "removing current neovim config..."
rm -rfv ~/.config/nvim/*
echo "copying files..."
cp -rv * ~/.config/nvim/
;;
n|N )
echo "aborting..."
exit 0
;;
* )
echo "invalid"
exit 1
;;
case "$choice" in
y | Y)
echo "removing current neovim config..."
rm -rfv ~/.config/nvim/*
echo "copying files..."
cp -rv * ~/.config/nvim/
;;
n | N)
echo "aborting..."
exit 0
;;
*)
echo "invalid"
exit 1
;;
esac