Compare commits
34 Commits
Author | SHA1 | Date |
---|---|---|
Sven Vogel | 0ee6fb54cd | |
Sven Vogel | 5ea47d03d3 | |
Sven Vogel | 8e01e20202 | |
Sven Vogel | c69a88e20f | |
Sven Vogel | 252bfae0b0 | |
Sven Vogel | 840ac3d0cb | |
Sven Vogel | 9c8afc73b4 | |
Sven Vogel | 3159d83be7 | |
Sven Vogel | e602c90efc | |
Sven Vogel | 6b5508c3a3 | |
Sven Vogel | 37ee45ce2e | |
Sven Vogel | 7e99cdca1d | |
Sven Vogel | 3ff3218ea1 | |
Sven Vogel | 58c4ff9b99 | |
Sven Vogel | d7d9402eb3 | |
Sven Vogel | ee88b9d3d8 | |
Sven Vogel | 2d649199e0 | |
Sven Vogel | e5223852d6 | |
Sven Vogel | 60f295c6ca | |
Sven Vogel | b508d8dc46 | |
Sven Vogel | ce3970e903 | |
Sven Vogel | e42c21740f | |
Sven Vogel | 38fbfb61c1 | |
Sven Vogel | 25b36c4c2a | |
Sven Vogel | 574c1f27ba | |
Sven Vogel | 1898a105f6 | |
Sven Vogel | 7e851622c6 | |
Sven Vogel | d8a6a44f70 | |
Sven Vogel | ec10265eb7 | |
Sven Vogel | 40d53234e5 | |
Sven Vogel | e02d24606d | |
Sven Vogel | accd0237d3 | |
Sven Vogel | ecaf12f283 | |
Sven Vogel | 596c33595c |
19
init.lua
19
init.lua
|
@ -1,4 +1,15 @@
|
|||
require('core.options')
|
||||
require('core.keymaps')
|
||||
require('core.autocmds')
|
||||
require("core.bootstrap")
|
||||
--
|
||||
-- Initialize Neovim configuration
|
||||
-- ..............................................
|
||||
--
|
||||
-- Author: Sven Vogel
|
||||
-- Created: 01.11.2024
|
||||
-- Edited: 01.11.2024
|
||||
--
|
||||
-- ==============================================
|
||||
|
||||
-- Load plugin manager
|
||||
-- and plugins, additonally setup global options
|
||||
require("config.lazy")
|
||||
-- install custom keymaps
|
||||
require("config.keys")
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
--
|
||||
-- Icons
|
||||
--
|
||||
-- ..............................................
|
||||
--
|
||||
-- Author: Sven Vogel
|
||||
-- Created: 08.11.2024
|
||||
-- Edited: 08.11.2024
|
||||
--
|
||||
-- ==============================================
|
||||
|
||||
return {
|
||||
diagnostics = {
|
||||
error = "",
|
||||
warn = "",
|
||||
hint = "",
|
||||
info = ""
|
||||
}
|
||||
}
|
|
@ -0,0 +1,170 @@
|
|||
--
|
||||
-- Global custom plugin agnostic keymaps
|
||||
-- ..............................................
|
||||
--
|
||||
-- Author: Sven Vogel
|
||||
-- Created: 01.11.2024
|
||||
-- Edited: 01.11.2024
|
||||
--
|
||||
-- ==============================================
|
||||
|
||||
local keymaps = {
|
||||
--
|
||||
-- Write buffer to disk
|
||||
-- ..............................................
|
||||
{
|
||||
mode = { 'n', 'i' },
|
||||
keys = '<C-s>',
|
||||
cmd = vim.cmd.write,
|
||||
desc = "Write buffer to disk"
|
||||
},
|
||||
{
|
||||
mode = { 'n', 'v', 'i' },
|
||||
keys = '<C-z>',
|
||||
cmd = vim.cmd.undo,
|
||||
desc = "Undo last edit"
|
||||
},
|
||||
{
|
||||
mode = { 'n', 'v', 'i' },
|
||||
keys = '<C-y>',
|
||||
cmd = vim.cmd.redo,
|
||||
desc = "Redo last edit that was undone"
|
||||
},
|
||||
--
|
||||
-- Buffer management
|
||||
-- ..............................................
|
||||
{
|
||||
mode = { 'n', 'i' },
|
||||
keys = '<C-t>',
|
||||
cmd = '<cmd>:enew<cr>',
|
||||
desc = "Edit new, unnamed buffer"
|
||||
},
|
||||
--
|
||||
-- Shift line(s) by one shiftwidth
|
||||
-- ..............................................
|
||||
{
|
||||
mode = { 'v' },
|
||||
keys = '<tab>',
|
||||
cmd = '>gv',
|
||||
desc = "Shift selection in visual mode right"
|
||||
},
|
||||
{
|
||||
mode = { 'v' },
|
||||
keys = '<S-tab>',
|
||||
cmd = '<gv',
|
||||
desc = "Shift selection in visual right"
|
||||
},
|
||||
--
|
||||
-- Window controls
|
||||
-- ..............................................
|
||||
{
|
||||
mode = { 'n', 'i' },
|
||||
keys = '<C-w>v',
|
||||
cmd = '<cmd>:vsplit<cr>',
|
||||
desc = "Split window vertically"
|
||||
},
|
||||
{
|
||||
mode = { 'n', 'i' },
|
||||
keys = '<C-w>h',
|
||||
cmd = '<cmd>:split<cr>',
|
||||
desc = "Split window horizontally"
|
||||
},
|
||||
{
|
||||
mode = { 'n' },
|
||||
keys = 'q',
|
||||
cmd = function()
|
||||
-- list of file types to ignore when counting split buffers
|
||||
local ignore = { "neo-tree" }
|
||||
-- number of windows per tab
|
||||
local wins = vim.api.nvim_tabpage_list_wins(0)
|
||||
-- count of open windows without those on ignore list
|
||||
local count = 0
|
||||
|
||||
-- check each window for its type
|
||||
for _, win in ipairs(wins) do
|
||||
local buf = vim.api.nvim_win_get_buf(win)
|
||||
local buf_type = vim.api.nvim_buf_get_option(buf, 'buftype')
|
||||
local file_type = vim.api.nvim_buf_get_option(buf, 'filetype')
|
||||
|
||||
if buf_type == '' then
|
||||
-- check if buffer is in ignore
|
||||
in_ignore = false
|
||||
for _, v in ipairs(ignore) do
|
||||
if v == file_type then
|
||||
in_ignore = true
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
if not in_ignore then
|
||||
count = count + 1
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if count == 1 then
|
||||
-- only one buffer without any split
|
||||
-- account for barbar specific behavior
|
||||
vim.cmd('BufferClose')
|
||||
else
|
||||
-- close window
|
||||
vim.cmd('q')
|
||||
end
|
||||
end,
|
||||
desc = "Close buffer"
|
||||
},
|
||||
{
|
||||
mode = { 'i', 'n', 'v' },
|
||||
keys = '<S-ScrollWheelDown>',
|
||||
cmd = '<ScrollWheelRight>',
|
||||
desc = "Scroll rightways"
|
||||
},
|
||||
{
|
||||
mode = { 'i', 'n', 'v' },
|
||||
keys = '<S-ScrollWheelUp>',
|
||||
cmd = '<ScrollWheelLeft>',
|
||||
desc = "Scroll leftways"
|
||||
},
|
||||
{
|
||||
mode = { 'i', 'n', 'v' },
|
||||
keys = '<C-b>',
|
||||
cmd = function()
|
||||
vim.cmd('Neotree toggle')
|
||||
end,
|
||||
desc = "Toggle neotree"
|
||||
},
|
||||
--
|
||||
-- Tab (barbar) controls
|
||||
-- ..............................................
|
||||
{
|
||||
mode = { 'n', 'i' },
|
||||
keys = '<C-tab>',
|
||||
cmd = vim.cmd('BufferNext'),
|
||||
desc = "Switch to the next buffer"
|
||||
},
|
||||
{
|
||||
mode = { 'n', 'i' },
|
||||
keys = '<C-S-tab>',
|
||||
cmd = vim.cmd('BufferPrevious'),
|
||||
desc = "Switch to the previous buffer"
|
||||
},
|
||||
{
|
||||
mode = { 'n' },
|
||||
keys = '<S-f>',
|
||||
cmd = function()
|
||||
vim.lsp.buf.format()
|
||||
end,
|
||||
desc = "Format buffer with current LSP"
|
||||
}
|
||||
}
|
||||
|
||||
for _, keymap in pairs(keymaps) do
|
||||
local mode = keymap.mode
|
||||
local lhs = keymap.keys
|
||||
local rhs = keymap.cmd
|
||||
local opts = {
|
||||
desc = keymap.desc,
|
||||
noremap = keymap.noremap
|
||||
}
|
||||
vim.keymap.set(mode, lhs, rhs, opts)
|
||||
end
|
|
@ -0,0 +1,74 @@
|
|||
--
|
||||
-- Bootstrap and start Lazy.nvim plugins
|
||||
-- manager.
|
||||
-- ..............................................
|
||||
--
|
||||
-- Author: Sven Vogel
|
||||
-- Created: 01.11.2024
|
||||
-- Edited: 01.11.2024
|
||||
--
|
||||
-- ==============================================
|
||||
|
||||
--
|
||||
-- Bootstrap Lazy.nvim package manager
|
||||
-- ..............................................
|
||||
|
||||
-- Bootstrap lazy.nvim
|
||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||
if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
||||
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
|
||||
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
|
||||
if vim.v.shell_error ~= 0 then
|
||||
vim.api.nvim_echo({
|
||||
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
|
||||
{ out, "WarningMsg" },
|
||||
{ "\nPress any key to exit..." },
|
||||
}, true, {})
|
||||
vim.fn.getchar()
|
||||
os.exit(1)
|
||||
end
|
||||
end
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
|
||||
--
|
||||
-- Early setup of Neovim and VIM options
|
||||
-- ..............................................
|
||||
|
||||
-- Make sure to setup `mapleader` and `maplocalleader` before
|
||||
-- loading lazy.nvim so that mappings are correct.
|
||||
-- This is also a good place to setup other settings (vim.opt)
|
||||
vim.g.mapleader = " "
|
||||
vim.g.maplocalleader = "\\"
|
||||
|
||||
-- load options
|
||||
require("config.opts")
|
||||
|
||||
--
|
||||
-- Start Lazy.nvim
|
||||
-- ..............................................
|
||||
|
||||
-- Setup lazy.nvim
|
||||
require("lazy").setup({
|
||||
spec = {
|
||||
-- import your plugins
|
||||
{ import = "plugins" },
|
||||
},
|
||||
-- Configure any other settings here. See the documentation for more details.
|
||||
-- colorscheme that will be used when installing plugins.
|
||||
install = { colorscheme = { "habamax" } },
|
||||
-- automatically check for plugin updates
|
||||
checker = { enabled = false },
|
||||
rtp = {
|
||||
disabled_plugins = {
|
||||
"gzip",
|
||||
"matchit",
|
||||
"matchparen",
|
||||
"netrw",
|
||||
"netrwplugin",
|
||||
"tarplugin",
|
||||
"tohtml",
|
||||
"tutor",
|
||||
"zipplugin",
|
||||
}
|
||||
},
|
||||
})
|
|
@ -0,0 +1,42 @@
|
|||
--
|
||||
-- Neovim and VIM global configuration
|
||||
-- and options
|
||||
-- ..............................................
|
||||
--
|
||||
-- Author: Sven Vogel
|
||||
-- Created: 01.11.2024
|
||||
-- Edited: 01.11.2024
|
||||
--
|
||||
-- ==============================================
|
||||
|
||||
--
|
||||
-- neovim global options
|
||||
-- ..............................................
|
||||
|
||||
local opt = vim.opt
|
||||
|
||||
opt.clipboard = vim.env.SSH_TTY and "" or "unnamedplus" -- Sync with system clipboard
|
||||
opt.confirm = true
|
||||
opt.cursorline = true
|
||||
opt.expandtab = true
|
||||
opt.ignorecase = true
|
||||
opt.laststatus = 3 -- global statusline
|
||||
opt.mouse = "a"
|
||||
opt.shiftwidth = 4
|
||||
opt.tabstop = 4
|
||||
opt.showmode = false
|
||||
opt.termguicolors = true -- True color support
|
||||
opt.virtualedit = "block" -- Allow cursor to move where there is no text in visual block mode
|
||||
opt.wrap = false
|
||||
opt.smoothscroll = true
|
||||
opt.swapfile = false -- disable swapfiles because they are fucking garbage
|
||||
opt.smartindent = true
|
||||
|
||||
--
|
||||
-- VIM global options
|
||||
-- ..............................................
|
||||
|
||||
-- disable netrw
|
||||
vim.g.loaded_netrw = 1
|
||||
vim.g.loaded_netrwPlugin = 1
|
||||
vim.g.inlay_hints_visible = true
|
|
@ -0,0 +1,15 @@
|
|||
--
|
||||
-- User interface configuration
|
||||
--
|
||||
-- ..............................................
|
||||
--
|
||||
-- Author: Sven Vogel
|
||||
-- Created: 07.11.2024
|
||||
-- Edited: 07.11.2024
|
||||
--
|
||||
-- ==============================================
|
||||
|
||||
return {
|
||||
border = 'rounded',
|
||||
winhighlight = 'NormalFloat:DiagnosticError'
|
||||
}
|
|
@ -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
|
|
@ -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 = " ",
|
||||
},
|
||||
},
|
||||
})
|
|
@ -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>')
|
|
@ -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
|
||||
}
|
||||
}
|
|
@ -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 = " ",
|
||||
}
|
|
@ -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 = " ",
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
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,
|
||||
opts = {
|
||||
auto_hide = 1,
|
||||
tabpages = true,
|
||||
clickable = true,
|
||||
-- Set the filetypes which barbar will offset itself for
|
||||
sidebar_filetypes = {
|
||||
['neo-tree'] = { event = 'BufWipeout' }
|
||||
}
|
||||
},
|
||||
version = '^1.0.0'
|
||||
}
|
||||
}
|
|
@ -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"
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
--
|
||||
-- Global custom plugin agnostic keymaps
|
||||
--
|
||||
-- Source: https://github.com/Eandrju/cellular-automaton.nvim
|
||||
-- ..............................................
|
||||
--
|
||||
-- Author: Sven Vogel
|
||||
-- Created: 01.11.2024
|
||||
-- Edited: 01.11.2024
|
||||
--
|
||||
-- ==============================================
|
||||
|
||||
return {
|
||||
{
|
||||
'eandrju/cellular-automaton.nvim'
|
||||
}
|
||||
}
|
|
@ -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",
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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"
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,119 +0,0 @@
|
|||
return {
|
||||
{
|
||||
"nvimdev/dashboard-nvim",
|
||||
event = "VimEnter",
|
||||
opts = function()
|
||||
local logo = [[
|
||||
⠀⠀⠀⢠⣤⣤⣤⣤⣤⣤⣤⠀⠀⠀⠀⠀⠀⠀⠀⣤⣤⣤⠀⣤⣤⡤⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠
|
||||
⠀⠀⠀⣾⣿⡿⠿⠿⠿⠿⠇⠀⠀⠀⠀⠀⠀⠀⢠⣿⣿⡇⢸⣿⣿⠇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣿⣿⡟
|
||||
⠀⠀⢰⣿⣿⠃⠀⠀⠀⠀⠀⣀⣀⣀⣀⡀⠀⠀⣼⣿⣿⠀⣿⣿⡿⠀⠀⣀⣀⡀⢠⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣸⣿⣿⠃
|
||||
⠀⠀⣿⣿⡟⠀⠀⠀⠀⢰⣿⣿⡟⢻⣿⣿⡆⢀⣿⣿⡇⢸⣿⣿⠃⢰⣿⣿⠋⢀⣿⣿⡆⢸⣿⣿⠃⠀⣿⣿⡟⢰⣿⣿⣿⣿⣿
|
||||
⠀⢠⣿⣿⣿⣶⣶⣶⠀⠿⠿⠿⠀⢸⣿⣿⠃⣼⣿⣿⠁⣾⣿⡿⠀⣿⡿⠃⢀⣾⣿⣿⠁⣾⣿⡿⠀⢰⣿⣿⠃⠀⣼⣿⣿⠃⠀
|
||||
⠀⣾⣿⡿⠛⠛⠛⠃⠀⣠⣤⣴⣴⣿⣿⡟⢠⣿⣿⡏⢰⣿⣿⠃⡸⠋⠀⠀⠚⠛⠛⡋⢰⣿⣿⠃⠀⣿⣿⡟⠀⢠⣿⣿⡟⠀⠀
|
||||
⢰⣿⣿⠇⠀⠀⠀⢀⣾⣿⡟⠉⣹⣿⣿⠁⣼⣿⣿⠁⣾⣿⡟⢠⣥⣤⣤⠄⠀⢀⣼⠁⣾⣿⡟⠀⣸⣿⣿⠃⠀⣼⣿⣿⠃⠀⠀
|
||||
⣼⣿⣿⠀⠀⠀⠀⢸⣿⣿⠇⠀⣿⣿⡿⢠⣿⣿⡇⢸⣿⣿⠇⣸⣿⣿⡏⠀⢀⣿⡏⢸⣿⣿⡇⠀⣿⣿⡿⠀⢠⣿⣿⡏⠀⠀⠀
|
||||
⣿⣿⡇⠀⠀⠀⠀⣿⣿⣿⣶⣾⣿⣿⠃⣼⣿⣿⠁⣾⣿⡿⠀⢿⣿⣿⠁⣰⣿⡿⠀⢸⣿⣿⣷⣾⣿⣿⠃⠀⢸⣿⣿⣷⡆⠀⠀
|
||||
⠉⠀⠀⠀⠀⠀⠈⠙⠉⠀⠉⠉⠉⠀⠉⠉⠁⠀⠉⠉⠁⠀⠀⠉⢁⠞⠉⠁⠀⠀⠈⠉⠉⠀⠉⠉⠉⠀⠀⠀⠉⠉⠉⠁⠀⠀
|
||||
]]
|
||||
|
||||
logo = string.rep("\n", 8) .. logo .. "\n\n"
|
||||
|
||||
local opts = {
|
||||
theme = "doom",
|
||||
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
|
||||
},
|
||||
config = {
|
||||
header = vim.split(logo, "\n"),
|
||||
-- stylua: ignore
|
||||
center = {
|
||||
{
|
||||
action = "Telescope find_files",
|
||||
desc = " Find file",
|
||||
icon =
|
||||
" ",
|
||||
key =
|
||||
"f"
|
||||
},
|
||||
{
|
||||
action = "ene | startinsert",
|
||||
desc = " New file",
|
||||
icon =
|
||||
" ",
|
||||
key =
|
||||
"n"
|
||||
},
|
||||
{
|
||||
action = "Telescope oldfiles",
|
||||
desc = " Recent files",
|
||||
icon =
|
||||
" ",
|
||||
key =
|
||||
"r"
|
||||
},
|
||||
{
|
||||
action = [[lua require("lazyvim.util").telescope.config_files()()]],
|
||||
desc = " Config",
|
||||
icon =
|
||||
" ",
|
||||
key =
|
||||
"c"
|
||||
},
|
||||
{
|
||||
action = 'lua require("persistence").load()',
|
||||
desc = " Restore Session",
|
||||
icon =
|
||||
" ",
|
||||
key =
|
||||
"s"
|
||||
},
|
||||
{
|
||||
action = "Lazy",
|
||||
desc = " Lazy",
|
||||
icon =
|
||||
" ",
|
||||
key =
|
||||
"l"
|
||||
},
|
||||
{
|
||||
action = "qa",
|
||||
desc = " Quit",
|
||||
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" }
|
||||
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,
|
||||
}
|
||||
}
|
|
@ -1,41 +1,35 @@
|
|||
--
|
||||
-- Improve the default vim.ui interfaces
|
||||
--
|
||||
-- Source: https://github.com/stevearc/dressing.nvim
|
||||
-- ..............................................
|
||||
--
|
||||
-- Author: Sven Vogel
|
||||
-- Created: 07.11.2024
|
||||
-- Edited: 07.11.2024
|
||||
--
|
||||
-- ==============================================
|
||||
|
||||
ui = require 'config.ui'
|
||||
|
||||
return {
|
||||
{
|
||||
"stevearc/dressing.nvim",
|
||||
'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",
|
||||
},
|
||||
},
|
||||
},
|
||||
select = {
|
||||
-- Set to false to disable the vim.ui.select implementation
|
||||
enabled = true,
|
||||
nui = {
|
||||
border = {
|
||||
style = "rounded",
|
||||
},
|
||||
border = ui.border,
|
||||
trim_prompt = true,
|
||||
win_options = {
|
||||
winhighlight = ui.winhighlight
|
||||
}
|
||||
},
|
||||
builtin = {
|
||||
border = "rounded",
|
||||
-- 'editor' and 'win' will default to being centered
|
||||
relative = "editor",
|
||||
select = {
|
||||
enabled = true,
|
||||
trim_prompt = true,
|
||||
win_options = {
|
||||
winhighlight = ui.winhighlight
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
--
|
||||
-- IDE-like breadcrumbs
|
||||
--
|
||||
-- Source: https://github.com/Bekaboo/dropbar.nvim
|
||||
-- ..............................................
|
||||
--
|
||||
-- Author: Sven Vogel
|
||||
-- Created: 10.11.2024
|
||||
-- Edited: 10.11.2024
|
||||
--
|
||||
-- ==============================================
|
||||
|
||||
local ui = require 'config.ui'
|
||||
|
||||
return {
|
||||
{
|
||||
'Bekaboo/dropbar.nvim',
|
||||
dependencies = {
|
||||
"nvim-tree/nvim-web-devicons",
|
||||
"onsails/lspkind.nvim"
|
||||
},
|
||||
opts = {
|
||||
menu = {
|
||||
preview = false,
|
||||
scrollbar = {
|
||||
enable = false
|
||||
},
|
||||
win_configs = {
|
||||
border = ui.border
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,19 +1,20 @@
|
|||
--
|
||||
-- Super fast git decorations implemented purely in Lua
|
||||
--
|
||||
-- Source: https://github.com/lewis6991/gitsigns.nvim
|
||||
-- ..............................................
|
||||
--
|
||||
-- Author: Sven Vogel
|
||||
-- Created: 07.11.2024
|
||||
-- Edited: 07.11.2024
|
||||
--
|
||||
-- ==============================================
|
||||
|
||||
return {
|
||||
{
|
||||
"lewis6991/gitsigns.nvim",
|
||||
'lewis6991/gitsigns.nvim',
|
||||
opts = {
|
||||
signs = {
|
||||
add = { text = "│" },
|
||||
change = { text = "┆" },
|
||||
delete = { text = "" },
|
||||
topdelete = { text = "" },
|
||||
changedelete = { text = "│" },
|
||||
untracked = { text = "│" },
|
||||
},
|
||||
signcolumn = true,
|
||||
preview_config = {
|
||||
border = 'single'
|
||||
}
|
||||
auto_attach = true,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,28 +1,25 @@
|
|||
--
|
||||
-- Identation markers
|
||||
--
|
||||
-- Source: https://github.com/lukas-reineke/indent-blankline.nvim
|
||||
-- ..............................................
|
||||
--
|
||||
-- Author: Sven Vogel
|
||||
-- Created: 08.11.2024
|
||||
-- Edited: 08.11.2024
|
||||
--
|
||||
-- ==============================================
|
||||
|
||||
return {
|
||||
{
|
||||
"lukas-reineke/indent-blankline.nvim",
|
||||
main = "ibl",
|
||||
---@module "ibl"
|
||||
---@type ibl.config
|
||||
opts = {
|
||||
indent = {
|
||||
char = "▏",
|
||||
tab_char = "▏",
|
||||
},
|
||||
scope = { enabled = false },
|
||||
exclude = {
|
||||
filetypes = {
|
||||
"help",
|
||||
"alpha",
|
||||
"dashboard",
|
||||
"neo-tree",
|
||||
"Trouble",
|
||||
"trouble",
|
||||
"lazy",
|
||||
"mason",
|
||||
"notify",
|
||||
"toggleterm",
|
||||
"lazyterm",
|
||||
},
|
||||
},
|
||||
scope = {
|
||||
enabled = true
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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,
|
||||
}
|
||||
}
|
|
@ -1,114 +0,0 @@
|
|||
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',
|
||||
}
|
||||
},
|
||||
},
|
||||
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 = '-',
|
||||
},
|
||||
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,
|
||||
},
|
||||
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_x = {
|
||||
'encoding',
|
||||
'fileformat',
|
||||
{
|
||||
'filetype',
|
||||
colored = true,
|
||||
on_click = function(_, _)
|
||||
vim.defer_fn(function()
|
||||
vim.cmd("Telescope filetypes")
|
||||
end, 100)
|
||||
end
|
||||
}
|
||||
},
|
||||
lualine_y = { 'progress' },
|
||||
lualine_z = { 'location' },
|
||||
},
|
||||
},
|
||||
dependencies = {
|
||||
'nvim-tree/nvim-web-devicons',
|
||||
"SmiteshP/nvim-navic",
|
||||
'kdheepak/lazygit.nvim'
|
||||
}
|
||||
},
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
return {
|
||||
{
|
||||
"L3MON4D3/LuaSnip",
|
||||
opts = {
|
||||
history = true,
|
||||
delete_check_events = "TextChanged",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,10 +1,47 @@
|
|||
--
|
||||
-- Mini plugin library
|
||||
--
|
||||
-- Source: https://github.com/lewis6991/gitsigns.nvim
|
||||
-- ..............................................
|
||||
--
|
||||
-- Author: Sven Vogel
|
||||
-- Created: 07.11.2024
|
||||
-- Edited: 07.11.2024
|
||||
--
|
||||
-- ==============================================
|
||||
|
||||
return {
|
||||
{
|
||||
'echasnovski/mini.nvim',
|
||||
version = '*',
|
||||
config = function()
|
||||
require("mini.pairs").setup()
|
||||
require("mini.clue").setup()
|
||||
end
|
||||
'echasnovski/mini.animate',
|
||||
version = false
|
||||
},
|
||||
{
|
||||
'echasnovski/mini.comment',
|
||||
version = false,
|
||||
opts = {
|
||||
mappings = {
|
||||
comment_line = '#',
|
||||
comment_visual = '#'
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
'echasnovski/mini.move',
|
||||
version = false,
|
||||
opts = {
|
||||
mappings = {
|
||||
-- Move visual selection in Visual mode. Defaults are Alt (Meta) + hjkl.
|
||||
left = nil,
|
||||
right = nil,
|
||||
down = '<C-down>',
|
||||
up = '<C-up>',
|
||||
|
||||
-- Move current line in Normal mode
|
||||
line_left = '<S-tab>',
|
||||
line_right = '<tab>',
|
||||
line_down = '<C-down>',
|
||||
line_up = '<C-up>',
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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,
|
||||
}
|
||||
}
|
|
@ -0,0 +1,99 @@
|
|||
--
|
||||
-- Pretty file tree with various sources
|
||||
--
|
||||
-- Source: https://github.com/nvim-neo-tree/neo-tree.nvim
|
||||
-- ..............................................
|
||||
--
|
||||
-- Author: Sven Vogel
|
||||
-- Created: 01.11.2024
|
||||
-- Edited: 07.11.2024
|
||||
--
|
||||
-- ==============================================
|
||||
|
||||
ui = require 'config.ui'
|
||||
|
||||
return {
|
||||
"nvim-neo-tree/neo-tree.nvim",
|
||||
lazy = false,
|
||||
branch = "v3.x",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
"nvim-tree/nvim-web-devicons",
|
||||
"MunifTanjim/nui.nvim",
|
||||
--
|
||||
-- List language server diagnostics
|
||||
--
|
||||
-- Source: https://github.com/mrbjarksen/neo-tree-diagnostics.nvim
|
||||
-- ..............................................
|
||||
--
|
||||
'mrbjarksen/neo-tree-diagnostics.nvim'
|
||||
},
|
||||
cmd = "Neotree",
|
||||
opts = {
|
||||
popup_border_style = ui.border,
|
||||
sources = {
|
||||
"filesystem",
|
||||
"document_symbols",
|
||||
"git_status",
|
||||
"diagnostics"
|
||||
},
|
||||
source_selector = {
|
||||
winbar = true,
|
||||
statusline = false,
|
||||
sources = {
|
||||
{
|
||||
source = "filesystem",
|
||||
display_name = " Files "
|
||||
},
|
||||
{
|
||||
source = "document_symbols",
|
||||
display_name = " Symbols "
|
||||
},
|
||||
{
|
||||
source = "diagnostics",
|
||||
display_name = " Diagnostics "
|
||||
}
|
||||
},
|
||||
},
|
||||
diagnostics = {
|
||||
follow_current_file = { -- May also be set to `true` or `false`
|
||||
enabled = true, -- This will find and focus the file in the active buffer every time
|
||||
always_focus_file = false, -- Focus the followed file, even when focus is currently on a diagnostic item belonging to that file
|
||||
expand_followed = true, -- Ensure the node of the followed file is expanded
|
||||
leave_dirs_open = true, -- `false` closes auto expanded dirs, such as with `:Neotree reveal`
|
||||
leave_files_open = true, -- `false` closes auto expanded files, such as with `:Neotree reveal`
|
||||
}
|
||||
},
|
||||
filesystem = {
|
||||
bind_to_cwd = false,
|
||||
follow_current_file = { enabled = true },
|
||||
use_libuv_file_watcher = true,
|
||||
hijack_netrw_behavior = "open_default",
|
||||
filtered_items = {
|
||||
hide_dotfiles = false,
|
||||
hide_gitignored = false,
|
||||
hide_hidden = false, -- only works on Windows for hidden files/directories
|
||||
},
|
||||
window = {
|
||||
position = "left"
|
||||
}
|
||||
},
|
||||
close_if_last_window = false,
|
||||
default_component_configs = {
|
||||
container = {
|
||||
enable_character_fade = true
|
||||
},
|
||||
indent = {
|
||||
indent_size = 2,
|
||||
padding = 1, -- extra padding on left hand side
|
||||
with_markers = true,
|
||||
indent_marker = "│",
|
||||
last_indent_marker = "└",
|
||||
with_expanders = true, -- if nil and file nesting is enabled, will enable expanders
|
||||
expander_collapsed = "",
|
||||
expander_expanded = "",
|
||||
expander_highlight = "NeoTreeExpander",
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,35 +0,0 @@
|
|||
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+" },
|
||||
},
|
||||
},
|
||||
view = "mini",
|
||||
},
|
||||
},
|
||||
presets = {
|
||||
bottom_search = true,
|
||||
command_palette = true,
|
||||
long_message_to_split = true,
|
||||
inc_rename = true,
|
||||
lsp_doc_border = true,
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
|
@ -1,6 +0,0 @@
|
|||
return {
|
||||
{
|
||||
"MunifTanjim/nui.nvim",
|
||||
lazy = true,
|
||||
}
|
||||
}
|
|
@ -0,0 +1,125 @@
|
|||
--
|
||||
-- Start config for builtin Neovim language server protocol client
|
||||
--
|
||||
-- Source: https://github.com/RRethy/vim-illuminate
|
||||
-- ..............................................
|
||||
--
|
||||
-- Author: Sven Vogel
|
||||
-- Created: 08.11.2024
|
||||
-- Edited: 08.11.2024
|
||||
--
|
||||
-- ==============================================
|
||||
|
||||
local ui = require 'config.ui'
|
||||
local icons = require 'config.icons'
|
||||
|
||||
return {
|
||||
{
|
||||
'neovim/nvim-lspconfig',
|
||||
dependencies = {
|
||||
"williamboman/mason.nvim",
|
||||
{
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
config = function()
|
||||
end
|
||||
},
|
||||
},
|
||||
opts = {
|
||||
inlay_hints = {
|
||||
enabled = true,
|
||||
},
|
||||
diagnostics = {
|
||||
update_in_insert = false,
|
||||
underline = true,
|
||||
severity_sort = false,
|
||||
float = {
|
||||
border = ui.border,
|
||||
source = 'always',
|
||||
},
|
||||
virtual_text = {
|
||||
spacing = 4,
|
||||
source = "if_many",
|
||||
-- this will set set the prefix to a function that returns the diagnostics icon based on the severity
|
||||
-- this only works on a recent 0.10.0 build. Will be set to "●" when not supported
|
||||
prefix = "icons"
|
||||
},
|
||||
signs = {
|
||||
text = {
|
||||
[vim.diagnostic.severity.ERROR] = icons.diagnostics.error,
|
||||
[vim.diagnostic.severity.WARN] = icons.diagnostics.warn,
|
||||
[vim.diagnostic.severity.HINT] = icons.diagnostics.hint,
|
||||
[vim.diagnostic.severity.INFO] = icons.diagnostics.info
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
config = function(_, opts)
|
||||
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)
|
||||
-- optionally enable inlay hints
|
||||
-- Source: https://www.reddit.com/r/neovim/comments/14em0f8/how_to_use_the_new_lsp_inlay_hints/
|
||||
-- ..............................................
|
||||
|
||||
if client.server_capabilities.inlayHintProvider and opts.inlay_hints.enabled then
|
||||
vim.lsp.inlay_hint.enable(true, { bufnr })
|
||||
end
|
||||
end
|
||||
})
|
||||
end,
|
||||
}
|
||||
|
||||
require("mason-lspconfig").setup({ handlers = handlers })
|
||||
|
||||
-- Setup diagnostic signs
|
||||
--
|
||||
-- Source: https://www.lazyvim.org/plugins/lsp#mason-lspconfignvim
|
||||
-- ..............................................
|
||||
|
||||
-- diagnostics signs
|
||||
if type(opts.diagnostics.signs) ~= "boolean" then
|
||||
for severity, icon in pairs(opts.diagnostics.signs.text) do
|
||||
local name = vim.diagnostic.severity[severity]:lower():gsub("^%l", string.upper)
|
||||
name = "DiagnosticSign" .. name
|
||||
vim.fn.sign_define(name, { text = icon, texthl = name, numhl = "" })
|
||||
end
|
||||
end
|
||||
|
||||
-- diagnostic sign as prefix for virtual text
|
||||
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)
|
||||
for d, icon in pairs(icons.diagnostics) do
|
||||
if diagnostic.severity == vim.diagnostic.severity[d:upper()] then
|
||||
return icon
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- Setup diagnostic user interface
|
||||
--
|
||||
-- Source: https://vonheikemen.github.io/devlog/tools/setup-nvim-lspconfig-plus-nvim-cmp
|
||||
-- ..............................................
|
||||
|
||||
vim.lsp.handlers['textDocument/hover'] = vim.lsp.with(
|
||||
vim.lsp.handlers.hover,
|
||||
{
|
||||
border = ui.border
|
||||
})
|
||||
|
||||
vim.lsp.handlers['textDocument/signatureHelp'] = vim.lsp.with(
|
||||
vim.lsp.handlers.signature_help,
|
||||
{
|
||||
border = ui.border
|
||||
})
|
||||
|
||||
vim.diagnostic.config(vim.deepcopy(opts.diagnostics))
|
||||
end
|
||||
}
|
||||
}
|
|
@ -1,35 +1,25 @@
|
|||
--
|
||||
-- Prettier user interface for VIM notifications.
|
||||
--
|
||||
-- Source: https://github.com/rcarriga/nvim-notify
|
||||
-- ..............................................
|
||||
--
|
||||
-- Author: Sven Vogel
|
||||
-- Created: 01.11.2024
|
||||
-- Edited: 01.11.2024
|
||||
--
|
||||
-- ==============================================
|
||||
|
||||
return {
|
||||
{
|
||||
"rcarriga/nvim-notify",
|
||||
keys = {
|
||||
{
|
||||
"<leader>un",
|
||||
function()
|
||||
require("notify").dismiss({ silent = true, pending = true })
|
||||
end,
|
||||
desc = "Dismiss all Notifications",
|
||||
},
|
||||
},
|
||||
'rcarriga/nvim-notify',
|
||||
lazy = false,
|
||||
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,
|
||||
render = "wrapped-compact"
|
||||
},
|
||||
-- Source: https://www.lazyvim.org/plugins/ui#nvim-notify
|
||||
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,
|
||||
vim.notify = require('notify')
|
||||
end
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,17 +0,0 @@
|
|||
return {
|
||||
{
|
||||
"dstein64/nvim-scrollview",
|
||||
opts = {
|
||||
excluded_filetypes = {
|
||||
'dashboard',
|
||||
'neo-tree',
|
||||
'aerial'
|
||||
},
|
||||
signs_on_startup = {
|
||||
'conflicts',
|
||||
'search',
|
||||
'cursor'
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,41 +0,0 @@
|
|||
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,
|
||||
},
|
||||
}
|
||||
},
|
||||
diagnostics = {
|
||||
enable = true,
|
||||
show_on_dirs = false,
|
||||
},
|
||||
actions = {
|
||||
change_dir = {
|
||||
enable = false,
|
||||
restrict_above_cwd = true,
|
||||
},
|
||||
open_file = {
|
||||
resize_window = false,
|
||||
window_picker = {
|
||||
chars = "aoeui",
|
||||
},
|
||||
},
|
||||
remove_file = {
|
||||
close_window = false,
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,40 @@
|
|||
--
|
||||
-- Tree sitter syntax highlightning
|
||||
--
|
||||
-- Source: https://github.com/nvim-treesitter/nvim-treesitter
|
||||
-- https://www.lazyvim.org/plugins/treesitter
|
||||
-- ..............................................
|
||||
--
|
||||
-- Author: Sven Vogel
|
||||
-- Created: 07.11.2024
|
||||
-- Edited: 07.11.2024
|
||||
--
|
||||
-- ==============================================
|
||||
|
||||
return {
|
||||
{
|
||||
'nvim-treesitter/nvim-treesitter',
|
||||
version = false, -- last release is way too old and doesn't work on Windows
|
||||
build = ":TSUpdate",
|
||||
lazy = vim.fn.argc(-1) == 0, -- load treesitter early when opening a file from the cmdline
|
||||
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-treesitter** module to be loaded in time.
|
||||
-- Luckily, the only things 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,
|
||||
cmd = { "TSUpdateSync", "TSUpdate", "TSInstall" },
|
||||
opts = {
|
||||
auto_install = true,
|
||||
highlight = {
|
||||
enable = true
|
||||
},
|
||||
indent = {
|
||||
enable = true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,6 +0,0 @@
|
|||
return {
|
||||
{
|
||||
'nvim-lua/plenary.nvim'
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
--
|
||||
-- Super fast git decorations implemented purely in Lua
|
||||
--
|
||||
-- Source: https://github.com/lewis6991/satellite.nvim
|
||||
-- ..............................................
|
||||
--
|
||||
-- Author: Sven Vogel
|
||||
-- Created: 07.11.2024
|
||||
-- Edited: 07.11.2024
|
||||
--
|
||||
-- ==============================================
|
||||
|
||||
return {
|
||||
{
|
||||
'lewis6991/satellite.nvim',
|
||||
opts = {
|
||||
current_only = false
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,16 +0,0 @@
|
|||
return {
|
||||
{
|
||||
"mrjones2014/smart-splits.nvim",
|
||||
opts = {
|
||||
ignored_filetypes = {
|
||||
"nofile",
|
||||
"quickfix",
|
||||
"qf",
|
||||
"prompt"
|
||||
},
|
||||
ignored_buftypes = {
|
||||
"nofile"
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
|
@ -1,43 +0,0 @@
|
|||
return {
|
||||
{
|
||||
"luukvbaal/statuscol.nvim",
|
||||
config = function()
|
||||
local builtin = require("statuscol.builtin")
|
||||
require("statuscol").setup({
|
||||
ft_ignore = {
|
||||
"neo-tree",
|
||||
"toggleterm",
|
||||
"dashboard",
|
||||
"aerial",
|
||||
},
|
||||
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"
|
||||
},
|
||||
-- git signs
|
||||
{
|
||||
sign = { namespace = { "gitsigns" } },
|
||||
click = "v:lua.ScSa"
|
||||
}
|
||||
}
|
||||
})
|
||||
end,
|
||||
}
|
||||
}
|
|
@ -1,28 +0,0 @@
|
|||
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'
|
||||
},
|
||||
},
|
||||
}
|
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,15 +0,0 @@
|
|||
return {
|
||||
{
|
||||
"akinsho/toggleterm.nvim",
|
||||
opts = {
|
||||
open_mapping = '<F7>',
|
||||
start_in_insert = true,
|
||||
direction = 'float',
|
||||
shade_terminals = true,
|
||||
shading_factor = -30,
|
||||
float_opts = {
|
||||
border = 'curved',
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
|
@ -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",
|
||||
},
|
||||
}
|
||||
}
|
|
@ -1,83 +0,0 @@
|
|||
return {
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
version = false, -- last release is way too old and doesn't work on Windows
|
||||
build = ":TSUpdate",
|
||||
dependencies = {
|
||||
"nvim-treesitter/nvim-treesitter-textobjects",
|
||||
},
|
||||
cmd = {
|
||||
"TSUpdateSync",
|
||||
"TSUpdate",
|
||||
"TSInstall"
|
||||
},
|
||||
opts = {
|
||||
autotag = {
|
||||
enable = true
|
||||
},
|
||||
highlight = {
|
||||
enable = true
|
||||
},
|
||||
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>",
|
||||
},
|
||||
},
|
||||
textobjects = {
|
||||
move = {
|
||||
enable = true,
|
||||
goto_next_start = { ["]f"] = "@function.outer", ["]c"] = "@class.outer" },
|
||||
goto_next_end = { ["]F"] = "@function.outer", ["]C"] = "@class.outer" },
|
||||
goto_previous_start = { ["[f"] = "@function.outer", ["[c"] = "@class.outer" },
|
||||
goto_previous_end = { ["[F"] = "@function.outer", ["[C"] = "@class.outer" },
|
||||
},
|
||||
},
|
||||
},
|
||||
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,
|
||||
}
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
return {
|
||||
{
|
||||
"folke/trouble.nvim",
|
||||
opts = {
|
||||
use_diagnostic_signs = true,
|
||||
indent_lines = false,
|
||||
},
|
||||
}
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
--
|
||||
-- Dim all non active scopes using tree sitter
|
||||
--
|
||||
-- Source: https://github.com/folke/twilight.nvim
|
||||
-- ..............................................
|
||||
--
|
||||
-- Author: Sven Vogel
|
||||
-- Created: 07.11.2024
|
||||
-- Edited: 07.11.2024
|
||||
--
|
||||
-- ==============================================
|
||||
|
||||
return {
|
||||
{
|
||||
"folke/twilight.nvim",
|
||||
opts = {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
return {
|
||||
{
|
||||
"tpope/vim-fugitive",
|
||||
}
|
||||
}
|
|
@ -1,33 +1,23 @@
|
|||
--
|
||||
-- Mark all occurances of the word under the current cursor
|
||||
--
|
||||
-- Source: https://github.com/RRethy/vim-illuminate
|
||||
-- ..............................................
|
||||
--
|
||||
-- Author: Sven Vogel
|
||||
-- Created: 08.11.2024
|
||||
-- Edited: 08.11.2024
|
||||
--
|
||||
-- ==============================================
|
||||
|
||||
return {
|
||||
{
|
||||
"RRethy/vim-illuminate",
|
||||
'RRethy/vim-illuminate',
|
||||
opts = {
|
||||
delay = 200,
|
||||
large_file_cutoff = 2000,
|
||||
large_file_overrides = {
|
||||
providers = { "lsp" },
|
||||
},
|
||||
case_insensitive_regex = false,
|
||||
},
|
||||
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,
|
||||
config = function(opts)
|
||||
require('illuminate').configure(opts)
|
||||
end
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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,
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue