mirror of
https://github.com/tiyn/dotfiles.git
synced 2026-03-19 14:44:46 +01:00
updated neovim to use modern lazy
This commit is contained in:
32
.config/nvim/lua/autocmd.lua
Normal file
32
.config/nvim/lua/autocmd.lua
Normal file
@@ -0,0 +1,32 @@
|
||||
-- highlighting yanked regions
|
||||
vim.api.nvim_create_autocmd("TextYankPost", {
|
||||
callback = function()
|
||||
vim.highlight.on_yank({ higroup = "YankHighlight" })
|
||||
end,
|
||||
})
|
||||
|
||||
-- -- gnikdroy/projections.nvim
|
||||
-- local Session = require("projections.session")
|
||||
-- vim.api.nvim_create_autocmd({ "VimLeavePre" }, {
|
||||
-- callback = function()
|
||||
-- Session.store(vim.loop.cwd())
|
||||
-- end,
|
||||
-- })
|
||||
--
|
||||
-- vim.api.nvim_create_autocmd({ "VimEnter" }, {
|
||||
-- callback = function()
|
||||
-- if vim.fn.argc() ~= 0 then
|
||||
-- return
|
||||
-- end
|
||||
-- local session_info = Session.info(vim.loop.cwd())
|
||||
-- if session_info ~= nil then
|
||||
-- Session.restore(vim.loop.cwd())
|
||||
-- end
|
||||
-- end,
|
||||
-- desc = "Restore last session automatically",
|
||||
-- })
|
||||
|
||||
-- stevearc/oil.nvim
|
||||
vim.api.nvim_create_user_command("Renamer", function(opts)
|
||||
vim.cmd("Oil " .. opts.args)
|
||||
end, { nargs = "*" })
|
||||
346
.config/nvim/lua/keymap.lua
Normal file
346
.config/nvim/lua/keymap.lua
Normal file
@@ -0,0 +1,346 @@
|
||||
-- setup keymap function
|
||||
local lazygit = require("FTerm"):new({ cmd = "lazygit" })
|
||||
local telescope = require("telescope")
|
||||
local wk = require("which-key")
|
||||
|
||||
wk.add({
|
||||
-- setup keymap groups
|
||||
{ mode = "n", "g", desc = "LSP: goto" },
|
||||
{ mode = "n", "gp", desc = "LSP: preview" },
|
||||
{ mode = "c", "w", desc = "Write" },
|
||||
{ mode = "c", "w!", desc = "Write: overwrite" },
|
||||
{ mode = "n", "<leader>a", desc = "AI" },
|
||||
{ mode = "n", "<leader>g", desc = "Git" },
|
||||
{ mode = "n", "<leader>f", desc = "Telescope: find" },
|
||||
{ mode = "n", "<leader>gd", desc = "Git: diff" },
|
||||
{ mode = "n", "<leader>s", desc = "Substitute" },
|
||||
{ mode = "n", "<leader>t", desc = "Terminal" },
|
||||
{ mode = "n", "<C-W>", desc = "Navigation" },
|
||||
-- unmap unwanted commands
|
||||
{ mode = "n", "Zt", "<NOP>", noremap = true },
|
||||
{ mode = "n", "ZT", "<NOP>", noremap = true },
|
||||
{ mode = "n", "<Space>", "<NOP>", noremap = true },
|
||||
{ mode = "n", "<F1>", "<NOP>", noremap = true },
|
||||
{ mode = "n", "<F2>", "<NOP>", noremap = true },
|
||||
{ mode = "n", "<F3>", "<NOP>", noremap = true },
|
||||
{ mode = "n", "<F4>", "<NOP>", noremap = true },
|
||||
{ mode = "n", "<F5>", "<NOP>", noremap = true },
|
||||
{ mode = "n", "<F6>", "<NOP>", noremap = true },
|
||||
{ mode = "n", "<F7>", "<NOP>", noremap = true },
|
||||
{ mode = "n", "<F8>", "<NOP>", noremap = true },
|
||||
{ mode = "n", "<F9>", "<NOP>", noremap = true },
|
||||
{ mode = "n", "<F10>", "<NOP>", noremap = true },
|
||||
{ mode = "n", "<F11>", "<NOP>", noremap = true },
|
||||
{ mode = "n", "<F12>", "<NOP>", noremap = true },
|
||||
-- shortcuts for quitting
|
||||
{ mode = "n", "ZA", ":xa<CR>", desc = "Exit: write and quit all buffers", noremap = true },
|
||||
{ mode = "n", "ZQ", ":conf q<CR>", desc = "Exit: quit current buffer", noremap = true },
|
||||
{ mode = "n", "ZZ", ":x<CR>", desc = "Exit: write and quit current buffer", noremap = true },
|
||||
-- shortcut for split navigation
|
||||
{ mode = "n", "<C-h>", "<C-w>h", desc = "Navigation: go to left window", noremap = true },
|
||||
{ mode = "n", "<C-j>", "<C-w>j", desc = "Navigation: go to lower window", noremap = true },
|
||||
{ mode = "n", "<C-k>", "<C-w>k", desc = "Navigation: go to upper window", noremap = true },
|
||||
{ mode = "n", "<C-l>", "<C-w>l", desc = "Navigation: go to right window", noremap = true },
|
||||
-- remap for dealing with word wrap
|
||||
{ mode = "n", "j", "gj", desc = "Navigation: go down in wrapped lines", silent = true },
|
||||
{ mode = "n", "k", "gk", desc = "Navigation: go up in wrapped lines", silent = true },
|
||||
-- compiler for languages
|
||||
{
|
||||
mode = "n",
|
||||
"<leader>c",
|
||||
":w! | !compiler <c-r>%<CR>",
|
||||
desc = "Compile: current file",
|
||||
noremap = true,
|
||||
},
|
||||
{
|
||||
mode = "n",
|
||||
"w!!",
|
||||
'execute "silent! write !sudo tee % >/dev/null" <bar> edit!',
|
||||
desc = "Write: overwrite file over with sudo",
|
||||
noremap = true,
|
||||
},
|
||||
-- tpope/vim-abolish
|
||||
{
|
||||
mode = "n",
|
||||
"<leader>sa",
|
||||
":%S//g<Left><Left>",
|
||||
desc = "Substitute: free form",
|
||||
noremap = true,
|
||||
},
|
||||
{
|
||||
mode = "n",
|
||||
"<leader>ss",
|
||||
":%S/\\<<C-r><C-w>\\>//g<Left><Left>",
|
||||
desc = "Substitute: word under cursor",
|
||||
noremap = true,
|
||||
},
|
||||
-- simrat39/symbols-outline.nvim
|
||||
{ mode = "n", "<F3>", ":Outline<CR>", desc = "CTags: toggle" },
|
||||
-- nvim-tree/nvim-tree.lua
|
||||
{ mode = "n", "<F2>", ":NvimTreeToggle toggle<CR>", desc = "File tree: toggle" },
|
||||
-- mbbill/undotree
|
||||
{ mode = "n", "<F1>", ":UndotreeToggle<CR>", desc = "Undo tree: toggle" },
|
||||
-- amrbashir/nvim-docs-view
|
||||
{
|
||||
mode = "n",
|
||||
"go",
|
||||
":DocsViewToggle<CR>",
|
||||
desc = "LSP: toggle documentation window",
|
||||
noremap = true,
|
||||
},
|
||||
-- numtostr/fterm.nvim
|
||||
{ mode = "n", "<leader>tt", require("FTerm").toggle, desc = "Terminal: open", noremap = true },
|
||||
{
|
||||
mode = "n",
|
||||
"<leader>gt",
|
||||
function()
|
||||
lazygit:toggle()
|
||||
end,
|
||||
desc = "Git: open lazygit",
|
||||
noremap = true,
|
||||
},
|
||||
{
|
||||
mode = "n",
|
||||
"<leader>tg",
|
||||
function()
|
||||
lazygit:toggle()
|
||||
end,
|
||||
desc = "Terminal: open lazygit",
|
||||
noremap = true,
|
||||
},
|
||||
-- sindrets/diffview.nvim
|
||||
{ mode = "n", "<leader>gdo", ":DiffviewOpen<CR>", desc = "Git: open diff" },
|
||||
{ mode = "n", "<leader>gdc", ":DiffviewClose<CR>", desc = "Git: close diff" },
|
||||
-- folke/trouble.nvim
|
||||
{ mode = "n", "<F4>", ":Trouble diagnostics toggle<CR>", desc = "LSP: toggle error list" },
|
||||
-- hrsh7th/nvim-cmp
|
||||
{
|
||||
mode = "n",
|
||||
"gd",
|
||||
function()
|
||||
vim.lsp.buf.definition()
|
||||
end,
|
||||
desc = "LSP: goto definition",
|
||||
noremap = true,
|
||||
},
|
||||
{
|
||||
mode = "n",
|
||||
"gD",
|
||||
function()
|
||||
vim.lsp.buf.declaration()
|
||||
end,
|
||||
desc = "LSP: goto declaration",
|
||||
noremap = true,
|
||||
},
|
||||
{
|
||||
mode = "n",
|
||||
"gT",
|
||||
function()
|
||||
vim.lsp.buf.type_definition()
|
||||
end,
|
||||
desc = "LSP: goto type definition",
|
||||
noremap = true,
|
||||
},
|
||||
{
|
||||
mode = "n",
|
||||
"gi",
|
||||
function()
|
||||
vim.lsp.buf.implementation()
|
||||
end,
|
||||
desc = "LSP: list implementation",
|
||||
noremap = true,
|
||||
},
|
||||
{
|
||||
mode = "n",
|
||||
"gr",
|
||||
function()
|
||||
vim.lsp.buf.references()
|
||||
end,
|
||||
desc = "LSP: list references",
|
||||
noremap = true,
|
||||
},
|
||||
{ mode = "n", "K", vim.lsp.buf.hover(), desc = "LSP: show documentation", noremap = true },
|
||||
{
|
||||
mode = "n",
|
||||
"<F8>",
|
||||
function()
|
||||
require("conform").format({ async = true, lsp_fallback = true })
|
||||
end,
|
||||
desc = "LSP: format",
|
||||
noremap = true,
|
||||
},
|
||||
-- rmagatti/goto-preview
|
||||
{
|
||||
mode = "n",
|
||||
"gpd",
|
||||
function()
|
||||
require("goto-preview").goto_preview_definition()
|
||||
end,
|
||||
desc = "LSP: preview definition",
|
||||
noremap = true,
|
||||
},
|
||||
{
|
||||
mode = "n",
|
||||
"gpy",
|
||||
function()
|
||||
require("goto-preview").goto_preview_type_definition()
|
||||
end,
|
||||
desc = "LSP: preview type definition",
|
||||
noremap = true,
|
||||
},
|
||||
{
|
||||
mode = "n",
|
||||
"gpi",
|
||||
function()
|
||||
require("goto-preview").goto_preview_implementation()
|
||||
end,
|
||||
desc = "LSP: list preview implementation",
|
||||
noremap = true,
|
||||
},
|
||||
{
|
||||
mode = "n",
|
||||
"gpD",
|
||||
function()
|
||||
require("goto-preview").goto_preview_declaration()
|
||||
end,
|
||||
desc = "LSP: preview declaration",
|
||||
noremap = true,
|
||||
},
|
||||
{
|
||||
mode = "n",
|
||||
"gpr",
|
||||
function()
|
||||
require("goto-preview").goto_preview_references()
|
||||
end,
|
||||
desc = "LSP: list preview references",
|
||||
noremap = true,
|
||||
},
|
||||
{
|
||||
mode = "n",
|
||||
"gpc",
|
||||
function()
|
||||
require("goto-preview").close_all_win()
|
||||
end,
|
||||
desc = "LSP: close all preview windows",
|
||||
noremap = true,
|
||||
},
|
||||
-- filipdutescu/renamer.nvim
|
||||
{
|
||||
mode = "n",
|
||||
"<F5>",
|
||||
function()
|
||||
require("renamer").rename()
|
||||
end,
|
||||
desc = "LSP: rename",
|
||||
noremap = true,
|
||||
},
|
||||
-- nvim-telescope/telescope.nvim
|
||||
{
|
||||
mode = "n",
|
||||
"<leader>ff",
|
||||
":Telescope find_files<CR>",
|
||||
desc = "Telescope: find files",
|
||||
noremap = true,
|
||||
},
|
||||
{
|
||||
mode = "n",
|
||||
"<leader>ff",
|
||||
":Telescope find_files<CR>",
|
||||
desc = "Telescope: find files",
|
||||
noremap = true,
|
||||
},
|
||||
-- archie-judd/telescope-words.nvim
|
||||
{
|
||||
mode = "n",
|
||||
"<leader>wd",
|
||||
telescope.extensions.telescope_words.search_dictionary,
|
||||
desc = "Telescope: search dictionary",
|
||||
noremap = true,
|
||||
},
|
||||
{
|
||||
mode = "n",
|
||||
"<leader>wt",
|
||||
telescope.extensions.telescope_words.search_thesaurus,
|
||||
desc = "Telescope: search thesaurus",
|
||||
noremap = true,
|
||||
},
|
||||
-- gnikdroy/projections.nvim
|
||||
{
|
||||
mode = "n",
|
||||
"<leader>fp",
|
||||
function()
|
||||
vim.cmd("Telescope projections")
|
||||
end,
|
||||
desc = "Telescope: find projects",
|
||||
noremap = true,
|
||||
},
|
||||
-- kamykn/spelunker.vim
|
||||
{
|
||||
mode = "n",
|
||||
"<F10>t",
|
||||
":call spelunker#toggle()<CR>",
|
||||
desc = "Spelunker: toggle spell check",
|
||||
noremap = true,
|
||||
},
|
||||
{ mode = "n", "<F10>s", "z=", desc = "Spell: display suggestions" },
|
||||
-- kevinhwang91/nvim-ufo
|
||||
{
|
||||
mode = "n",
|
||||
"K",
|
||||
function()
|
||||
local winid = require("ufo").peekFoldedLinesUnderCursor()
|
||||
if not winid then
|
||||
vim.lsp.buf.hover()
|
||||
end
|
||||
end,
|
||||
desc = "LSP: peek folded section",
|
||||
noremap = true,
|
||||
},
|
||||
-- kevinhwang91/nvim-hlslens
|
||||
{
|
||||
mode = "n",
|
||||
"n",
|
||||
[[<Cmd>execute('normal! ' . v:count1 . 'n')<CR><Cmd>lua require('hlslens').start()<CR>]],
|
||||
desc = "Search: search forward",
|
||||
noremap = true,
|
||||
silent = true,
|
||||
},
|
||||
{
|
||||
mode = "n",
|
||||
"N",
|
||||
[[<Cmd>execute('normal! ' . v:count1 . 'N')<CR><Cmd>lua require('hlslens').start()<CR>]],
|
||||
desc = "Search: search backwards",
|
||||
noremap = true,
|
||||
silent = true,
|
||||
},
|
||||
-- sindrets/winshift.nvim
|
||||
{
|
||||
mode = "n",
|
||||
"<C-W>m",
|
||||
":WinShift<CR>",
|
||||
desc = "Navigation: enter window shift mode",
|
||||
noremap = true,
|
||||
},
|
||||
-- ggandor/leap.nvim
|
||||
{
|
||||
mode = "n",
|
||||
"f",
|
||||
"<Plug>(leap-forward)",
|
||||
desc = "Navigation: enter leap mode for forward movement",
|
||||
noremap = true,
|
||||
},
|
||||
{
|
||||
mode = "n",
|
||||
"F",
|
||||
"<Plug>(leap-backward)",
|
||||
desc = "Navigation: enter leap mode for backwards movement",
|
||||
noremap = true,
|
||||
},
|
||||
{
|
||||
mode = "n",
|
||||
"gf",
|
||||
"<Plug>(leap-from-window)",
|
||||
desc = "Navigation: enter leap mode for other windows",
|
||||
noremap = true,
|
||||
},
|
||||
})
|
||||
26
.config/nvim/lua/loadplugins.lua
Normal file
26
.config/nvim/lua/loadplugins.lua
Normal file
@@ -0,0 +1,26 @@
|
||||
-- bootstrap lazy
|
||||
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",
|
||||
lazypath,
|
||||
})
|
||||
end
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
|
||||
return require("lazy").setup(
|
||||
{
|
||||
-- import plugins from the plugins directory
|
||||
{ import = "plugins" },
|
||||
},
|
||||
-- lazy.nvim configuration
|
||||
{
|
||||
ui = {
|
||||
icons = Lazy_signs,
|
||||
},
|
||||
}
|
||||
)
|
||||
15
.config/nvim/lua/plugins/barbecue.lua
Normal file
15
.config/nvim/lua/plugins/barbecue.lua
Normal file
@@ -0,0 +1,15 @@
|
||||
return {
|
||||
-- vs code like topbar
|
||||
"utilyre/barbecue.nvim",
|
||||
name = "barbecue",
|
||||
version = "*",
|
||||
dependencies = {
|
||||
"SmiteshP/nvim-navic",
|
||||
"nvim-tree/nvim-web-devicons", -- optional dependency
|
||||
},
|
||||
opts = {
|
||||
theme = {
|
||||
normal = { bg = "#272727" },
|
||||
},
|
||||
},
|
||||
}
|
||||
33
.config/nvim/lua/plugins/blink-pairs.lua
Normal file
33
.config/nvim/lua/plugins/blink-pairs.lua
Normal file
@@ -0,0 +1,33 @@
|
||||
return {
|
||||
-- rainbow auto-pairs
|
||||
"saghen/blink.pairs",
|
||||
version = "*", -- (recommended) only required with prebuilt binaries
|
||||
-- download prebuilt binaries from github releases
|
||||
dependencies = "saghen/blink.download",
|
||||
--- @module 'blink.pairs'
|
||||
--- @type blink.pairs.Config
|
||||
opts = {
|
||||
mappings = {
|
||||
enabled = true,
|
||||
pairs = {
|
||||
["("] = ")",
|
||||
["["] = "]",
|
||||
["{"] = "}",
|
||||
["'"] = "'",
|
||||
['"'] = '"',
|
||||
["`"] = "`",
|
||||
},
|
||||
},
|
||||
highlights = {
|
||||
enabled = true,
|
||||
groups = {
|
||||
"BlinkPairsOrange",
|
||||
"BlinkPairsPurple",
|
||||
"BlinkPairsBlue",
|
||||
},
|
||||
priority = 200,
|
||||
ns = vim.api.nvim_create_namespace("blink.pairs"),
|
||||
},
|
||||
debug = false,
|
||||
},
|
||||
}
|
||||
5
.config/nvim/lua/plugins/comment.lua
Normal file
5
.config/nvim/lua/plugins/comment.lua
Normal file
@@ -0,0 +1,5 @@
|
||||
return {
|
||||
-- commenting improvements
|
||||
"numtostr/comment.nvim",
|
||||
opts = {},
|
||||
}
|
||||
18
.config/nvim/lua/plugins/conform.lua
Normal file
18
.config/nvim/lua/plugins/conform.lua
Normal file
@@ -0,0 +1,18 @@
|
||||
return {
|
||||
-- improved refactoring
|
||||
"stevearc/conform.nvim",
|
||||
config = function()
|
||||
require("conform").setup({
|
||||
formatters_by_ft = {
|
||||
lua = { "stylua" },
|
||||
markdown = { "mdformat" },
|
||||
python = { "isort", "yapf" },
|
||||
sh = { "shfmt" },
|
||||
bash = { "shfmt" },
|
||||
zsh = { "shfmt" },
|
||||
tex = { "latexindent" },
|
||||
yaml = { "yamlfmt" },
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
||||
16
.config/nvim/lua/plugins/csvview.lua
Normal file
16
.config/nvim/lua/plugins/csvview.lua
Normal file
@@ -0,0 +1,16 @@
|
||||
return {
|
||||
-- improved csv handling
|
||||
"hat0uma/csvview.nvim",
|
||||
opts = {
|
||||
parser = { comments = { "#", "//" } },
|
||||
keymaps = {
|
||||
textobject_field_inner = { "if", mode = { "o", "x" } },
|
||||
textobject_field_outer = { "af", mode = { "o", "x" } },
|
||||
jump_next_field_end = { "<Tab>", mode = { "n", "v" } },
|
||||
jump_prev_field_end = { "<S-Tab>", mode = { "n", "v" } },
|
||||
jump_next_row = { "<Enter>", mode = { "n", "v" } },
|
||||
jump_prev_row = { "<S-Enter>", mode = { "n", "v" } },
|
||||
},
|
||||
},
|
||||
cmd = { "CsvViewEnable", "CsvViewDisable", "CsvViewToggle" },
|
||||
}
|
||||
5
.config/nvim/lua/plugins/diffview.lua
Normal file
5
.config/nvim/lua/plugins/diffview.lua
Normal file
@@ -0,0 +1,5 @@
|
||||
return {
|
||||
-- side by side git diffs for merge conflicts
|
||||
"sindrets/diffview.nvim",
|
||||
opts = {},
|
||||
}
|
||||
5
.config/nvim/lua/plugins/fterm.lua
Normal file
5
.config/nvim/lua/plugins/fterm.lua
Normal file
@@ -0,0 +1,5 @@
|
||||
return {
|
||||
-- floating terminal to toggle
|
||||
"numtostr/fterm.nvim",
|
||||
opts = {},
|
||||
}
|
||||
5
.config/nvim/lua/plugins/gitsigns.lua
Normal file
5
.config/nvim/lua/plugins/gitsigns.lua
Normal file
@@ -0,0 +1,5 @@
|
||||
return {
|
||||
-- display git status per line
|
||||
"lewis6991/gitsigns.nvim",
|
||||
opts = {},
|
||||
}
|
||||
8
.config/nvim/lua/plugins/goto-preview.lua
Normal file
8
.config/nvim/lua/plugins/goto-preview.lua
Normal file
@@ -0,0 +1,8 @@
|
||||
return {
|
||||
-- preview definitions using floating windows
|
||||
"rmagatti/goto-preview",
|
||||
dependencies = "rmagatti/logger.nvim",
|
||||
config = function()
|
||||
require("goto-preview").setup({})
|
||||
end,
|
||||
}
|
||||
7
.config/nvim/lua/plugins/indent-blankline.lua
Normal file
7
.config/nvim/lua/plugins/indent-blankline.lua
Normal file
@@ -0,0 +1,7 @@
|
||||
return {
|
||||
-- show indentation lines
|
||||
"lukas-reineke/indent-blankline.nvim",
|
||||
event = "BufReadPre",
|
||||
main = "ibl",
|
||||
opts = {},
|
||||
}
|
||||
13
.config/nvim/lua/plugins/leap.lua
Normal file
13
.config/nvim/lua/plugins/leap.lua
Normal file
@@ -0,0 +1,13 @@
|
||||
return {
|
||||
-- improved movement
|
||||
url = "https://codeberg.org/andyg/leap.nvim",
|
||||
config = function()
|
||||
require("leap").opts.highlight_unlabeled_phase_one_targets = true
|
||||
require("leap").opts.equivalence_classes = { " \t\r\n", "([{", ")]}", "'\"`" }
|
||||
require("leap").opts.special_keys.prev_target = "<backspace>"
|
||||
require("leap").opts.special_keys.prev_group = "<backspace>"
|
||||
require("leap.user").set_repeat_keys("<enter>", "<backspace>")
|
||||
require("leap").opts.safe_labels = "sfnut/SFNLHMUGTZ?"
|
||||
require("leap").opts.labels = "sfnjklhodweimbuyvrgtaqpcxz/SFNJKLHODWEIMBUYVRGTAQPCXZ?"
|
||||
end,
|
||||
}
|
||||
12
.config/nvim/lua/plugins/lsp_signature.lua
Normal file
12
.config/nvim/lua/plugins/lsp_signature.lua
Normal file
@@ -0,0 +1,12 @@
|
||||
return {
|
||||
-- show function signature while typing
|
||||
"ray-x/lsp_signature.nvim",
|
||||
opts = {
|
||||
bind = true,
|
||||
handler_opts = {
|
||||
border = "none",
|
||||
},
|
||||
hint_prefix = Hint_sign,
|
||||
hint_scheme = "DiagnosticSignHint",
|
||||
},
|
||||
}
|
||||
80
.config/nvim/lua/plugins/lualine.lua
Normal file
80
.config/nvim/lua/plugins/lualine.lua
Normal file
@@ -0,0 +1,80 @@
|
||||
return {
|
||||
-- statusline
|
||||
"nvim-lualine/lualine.nvim",
|
||||
dependencies = {
|
||||
{
|
||||
"nvim-tree/nvim-web-devicons",
|
||||
lazy = true,
|
||||
},
|
||||
{
|
||||
"f-person/git-blame.nvim",
|
||||
config = function()
|
||||
vim.g.gitblame_display_virtual_text = 0
|
||||
end,
|
||||
},
|
||||
{ "tiyn/tccs.nvim" },
|
||||
{
|
||||
"tiyn/action-hints.nvim",
|
||||
config = function()
|
||||
require("action-hints").setup({
|
||||
template = {
|
||||
-- definition = { text = "D", color = "#add8e6" },
|
||||
-- references = { text = "R%s", color = "#ff6666" },
|
||||
definition = { text = Definition_sign, color = "#add8e6" },
|
||||
references = { text = Reference_sign, color = "#ff6666" },
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
},
|
||||
config = function()
|
||||
require("lualine").setup({
|
||||
options = {
|
||||
globalstatus = true,
|
||||
symbols = {
|
||||
error = Error_sign,
|
||||
warn = Warn_sign,
|
||||
hint = Hint_sign,
|
||||
info = Info_sign,
|
||||
},
|
||||
theme = "tccs",
|
||||
component_separators = { left = "", right = "" },
|
||||
section_separators = { left = "", right = "" },
|
||||
},
|
||||
sections = {
|
||||
lualine_b = {
|
||||
{
|
||||
require("gitblame").get_current_blame_text,
|
||||
cond = require("gitblame").is_blame_text_available,
|
||||
},
|
||||
},
|
||||
lualine_c = {},
|
||||
lualine_x = {
|
||||
require("action-hints").statusline,
|
||||
"encoding",
|
||||
"fileformat",
|
||||
{
|
||||
"filetype",
|
||||
icon_only = true,
|
||||
},
|
||||
},
|
||||
lualine_y = {
|
||||
{
|
||||
"filename",
|
||||
file_status = true,
|
||||
newfile_status = true,
|
||||
path = 1,
|
||||
shorting_target = 50,
|
||||
symbols = {
|
||||
modified = Lualine_signs["modified"],
|
||||
readonly = Lualine_signs["readonly"],
|
||||
unnamed = Lualine_signs["unnamed"],
|
||||
newfile = Lualine_signs["newfile"],
|
||||
},
|
||||
},
|
||||
},
|
||||
lualine_z = { "progress", "location" },
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
||||
50
.config/nvim/lua/plugins/mason.lua
Normal file
50
.config/nvim/lua/plugins/mason.lua
Normal file
@@ -0,0 +1,50 @@
|
||||
return {
|
||||
-- lang server installations
|
||||
"williamboman/mason.nvim",
|
||||
dependencies = {
|
||||
{
|
||||
"nvimtools/none-ls.nvim",
|
||||
config = function()
|
||||
require("null-ls").setup({
|
||||
sources = {
|
||||
-- assembler
|
||||
require("null-ls").builtins.formatting.asmfmt,
|
||||
-- lua
|
||||
require("null-ls").builtins.formatting.stylua,
|
||||
-- markdown
|
||||
require("null-ls").builtins.formatting.mdformat,
|
||||
-- python
|
||||
require("null-ls").builtins.formatting.isort,
|
||||
require("null-ls").builtins.formatting.yapf,
|
||||
-- shell
|
||||
require("null-ls").builtins.formatting.shfmt,
|
||||
-- yaml
|
||||
require("null-ls").builtins.formatting.yamlfmt,
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
{
|
||||
"jay-babu/mason-null-ls.nvim",
|
||||
opts = {
|
||||
automatic_installation = true,
|
||||
ensure_installed = {
|
||||
-- assembler
|
||||
"asmfmt",
|
||||
-- lua
|
||||
"stylua",
|
||||
-- markdown
|
||||
"mdformat",
|
||||
-- python
|
||||
"isort",
|
||||
"yapf",
|
||||
-- shell
|
||||
"shfmt",
|
||||
-- yaml
|
||||
"yamlfmt",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
opts = { ui = { icons = Install_signs } },
|
||||
}
|
||||
7
.config/nvim/lua/plugins/modes.lua
Normal file
7
.config/nvim/lua/plugins/modes.lua
Normal file
@@ -0,0 +1,7 @@
|
||||
return {
|
||||
-- decorations for the current line mode
|
||||
"mvllow/modes.nvim",
|
||||
config = function()
|
||||
require("modes").setup()
|
||||
end,
|
||||
}
|
||||
85
.config/nvim/lua/plugins/nvim-cmp.lua
Normal file
85
.config/nvim/lua/plugins/nvim-cmp.lua
Normal file
@@ -0,0 +1,85 @@
|
||||
return {
|
||||
-- autocompletion and its sources and snippets
|
||||
"hrsh7th/nvim-cmp",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
"onsails/lspkind-nvim",
|
||||
-- cmp sources
|
||||
"hrsh7th/cmp-buffer",
|
||||
"hrsh7th/cmp-path",
|
||||
"uga-rosa/cmp-dictionary",
|
||||
"lukas-reineke/cmp-under-comparator",
|
||||
-- luasnip
|
||||
{
|
||||
"l3mon4d3/luasnip",
|
||||
config = function()
|
||||
require("luasnip.loaders.from_snipmate").lazy_load()
|
||||
end,
|
||||
version = "v2.*",
|
||||
dependencies = { "saadparwaiz1/cmp_luasnip" },
|
||||
},
|
||||
},
|
||||
config = function()
|
||||
local cmp = require("cmp")
|
||||
cmp.setup({
|
||||
sorting = {
|
||||
comparators = {
|
||||
cmp.config.compare.offset,
|
||||
cmp.config.compare.exact,
|
||||
cmp.config.compare.score,
|
||||
require("cmp-under-comparator").under,
|
||||
cmp.config.compare.kind,
|
||||
cmp.config.compare.sort_text,
|
||||
cmp.config.compare.length,
|
||||
cmp.config.compare.order,
|
||||
},
|
||||
},
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
require("luasnip").lsp_expand(args.body)
|
||||
end,
|
||||
},
|
||||
mapping = {
|
||||
["<S-Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_prev_item()
|
||||
elseif require("luasnip").jumpable(-1) then
|
||||
require("luasnip").jump(-1)
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
["<Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_next_item()
|
||||
elseif require("luasnip").expand_or_jumpable() then
|
||||
require("luasnip").expand_or_jump()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
["<C-e>"] = cmp.mapping.close(),
|
||||
["<CR>"] = cmp.mapping.confirm({
|
||||
behavior = cmp.ConfirmBehavior.Replace,
|
||||
select = true,
|
||||
}),
|
||||
},
|
||||
sources = {
|
||||
{ name = "nvim_lsp" },
|
||||
{ name = "luasnip" },
|
||||
{ name = "path" },
|
||||
{ name = "buffer" },
|
||||
{ name = "dictionary" },
|
||||
},
|
||||
formatting = {
|
||||
format = require("lspkind").cmp_format({
|
||||
mode = "symbol_text",
|
||||
preset = "codicons",
|
||||
maxwidth = 50,
|
||||
menu = Menu_signs,
|
||||
symbol_map = Lsp_signs,
|
||||
}),
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
||||
27
.config/nvim/lua/plugins/nvim-colorizer.lua
Normal file
27
.config/nvim/lua/plugins/nvim-colorizer.lua
Normal file
@@ -0,0 +1,27 @@
|
||||
return {
|
||||
-- showing color of hex values, etc
|
||||
"ChristianChiarulli/nvim-colorizer.lua",
|
||||
opts = {
|
||||
filetypes = {
|
||||
"*",
|
||||
"!markdown",
|
||||
},
|
||||
user_default_options = {
|
||||
RGB = true,
|
||||
RRGGBB = true,
|
||||
RRGGBBAA = true,
|
||||
AARRGGBB = true,
|
||||
rgb_fn = true,
|
||||
hsl_fn = true,
|
||||
css_fn = true,
|
||||
mode = "virtualtext",
|
||||
virtualtext = " ",
|
||||
},
|
||||
-- all the sub-options of filetypes apply to buftypes
|
||||
buftypes = {
|
||||
"*",
|
||||
"!prompt",
|
||||
"!popup",
|
||||
},
|
||||
},
|
||||
}
|
||||
9
.config/nvim/lua/plugins/nvim-docs-view.lua
Normal file
9
.config/nvim/lua/plugins/nvim-docs-view.lua
Normal file
@@ -0,0 +1,9 @@
|
||||
return {
|
||||
-- hover documentation
|
||||
"tiyn/nvim-docs-view",
|
||||
lazy = true,
|
||||
cmd = "DocsViewToggle",
|
||||
opts = {
|
||||
position = "bottom",
|
||||
},
|
||||
}
|
||||
7
.config/nvim/lua/plugins/nvim-hlslens.lua
Normal file
7
.config/nvim/lua/plugins/nvim-hlslens.lua
Normal file
@@ -0,0 +1,7 @@
|
||||
return {
|
||||
-- improved virtual text
|
||||
"kevinhwang91/nvim-hlslens",
|
||||
opts = {
|
||||
calm_down = true,
|
||||
},
|
||||
}
|
||||
98
.config/nvim/lua/plugins/nvim-lspconfig.lua
Normal file
98
.config/nvim/lua/plugins/nvim-lspconfig.lua
Normal file
@@ -0,0 +1,98 @@
|
||||
return {
|
||||
-- lang server management
|
||||
"neovim/nvim-lspconfig",
|
||||
dependencies = {
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
{
|
||||
"mrcjkb/rustaceanvim",
|
||||
version = "^6",
|
||||
lazy = false,
|
||||
},
|
||||
{
|
||||
"hrsh7th/cmp-nvim-lsp",
|
||||
config = function()
|
||||
Capabilities = require("cmp_nvim_lsp").default_capabilities()
|
||||
Capabilities.textDocument.foldingRange = {
|
||||
dynamicRegistration = false,
|
||||
lineFoldingOnly = true,
|
||||
}
|
||||
end,
|
||||
},
|
||||
},
|
||||
config = function()
|
||||
require("mason-lspconfig").setup({
|
||||
automatic_setup = true,
|
||||
ensure_installed = {
|
||||
-- assembler
|
||||
-- "asm_lsp", -- TODO: needs extra steps to install (rust)
|
||||
-- c
|
||||
"clangd",
|
||||
-- docker
|
||||
"dockerls",
|
||||
-- go
|
||||
"gopls",
|
||||
-- html
|
||||
"html",
|
||||
-- json
|
||||
"jsonls",
|
||||
-- xml
|
||||
"lemminx",
|
||||
-- latex
|
||||
-- "ltex", -- TODO: needs extra steps to install
|
||||
"texlab",
|
||||
-- lua
|
||||
"lua_ls",
|
||||
-- markdown
|
||||
"marksman",
|
||||
-- nim
|
||||
-- "nimls", -- TODO: needs extra steps to install (nimble)
|
||||
-- python
|
||||
"pyright",
|
||||
-- r
|
||||
-- "r_language_server", -- TODO: installation takes really long
|
||||
-- shell
|
||||
"bashls",
|
||||
-- sql
|
||||
"sqlls",
|
||||
-- typescript / javascript
|
||||
"ts_ls",
|
||||
-- yaml
|
||||
"yamlls",
|
||||
},
|
||||
})
|
||||
local default_flags = {
|
||||
debounce_text_changes = 150,
|
||||
allow_incremental_sync = true,
|
||||
progress = true,
|
||||
}
|
||||
local servers = {
|
||||
ltex = {
|
||||
settings = {
|
||||
ltex = {
|
||||
-- language = "de-DE",
|
||||
enabled = { "latex", "markdown" },
|
||||
},
|
||||
},
|
||||
},
|
||||
lua_ls = {
|
||||
settings = {
|
||||
lua = {
|
||||
diagnostics = { globals = { "vim" } },
|
||||
telemetry = { enable = false },
|
||||
},
|
||||
},
|
||||
},
|
||||
pyright = {},
|
||||
}
|
||||
for name, config in pairs(servers) do
|
||||
vim.lsp.config(
|
||||
name,
|
||||
vim.tbl_extend("force", config, {
|
||||
on_attach = on_attach,
|
||||
capabilities = Capabilities,
|
||||
flags = default_flags,
|
||||
})
|
||||
)
|
||||
end
|
||||
end,
|
||||
}
|
||||
57
.config/nvim/lua/plugins/nvim-scrollbar.lua
Normal file
57
.config/nvim/lua/plugins/nvim-scrollbar.lua
Normal file
@@ -0,0 +1,57 @@
|
||||
return {
|
||||
-- scrollbar with git and diagnostics support for easier navigation
|
||||
"petertriho/nvim-scrollbar",
|
||||
dependencies = {
|
||||
"kevinhwang91/nvim-hlslens",
|
||||
"lewis6991/gitsigns.nvim",
|
||||
},
|
||||
config = function()
|
||||
require("scrollbar").setup({
|
||||
marks = {
|
||||
Cursor = {
|
||||
highlight = "Normal",
|
||||
},
|
||||
Search = {
|
||||
highlight = "Special",
|
||||
},
|
||||
Error = {
|
||||
highlight = "DiagnosticSignError",
|
||||
},
|
||||
Warn = {
|
||||
highlight = "DiagnosticSignWarn",
|
||||
},
|
||||
Info = {
|
||||
highlight = "DiagnosticSignInfo",
|
||||
},
|
||||
Hint = {
|
||||
highlight = "DiagnosticSignHint",
|
||||
},
|
||||
Misc = {
|
||||
highlight = "Special",
|
||||
},
|
||||
GitAdd = {
|
||||
highlight = "GitGutterAdd",
|
||||
},
|
||||
GitChange = {
|
||||
highlight = "GitGutterChange",
|
||||
},
|
||||
GitDelete = {
|
||||
highlight = "GitGutterDelete",
|
||||
},
|
||||
},
|
||||
excluded_filetypes = {
|
||||
"cmp_docs",
|
||||
"cmp_menu",
|
||||
"noice",
|
||||
"prompt",
|
||||
"TelescopePrompt",
|
||||
"NvimTree",
|
||||
"Navbuddy",
|
||||
"FTerm",
|
||||
"",
|
||||
},
|
||||
})
|
||||
require("scrollbar.handlers.search").setup()
|
||||
require("scrollbar.handlers.gitsigns").setup()
|
||||
end,
|
||||
}
|
||||
7
.config/nvim/lua/plugins/nvim-surround.lua
Normal file
7
.config/nvim/lua/plugins/nvim-surround.lua
Normal file
@@ -0,0 +1,7 @@
|
||||
return {
|
||||
-- additional quote/parantheses funtions
|
||||
"kylechui/nvim-surround",
|
||||
version = "*",
|
||||
event = "VeryLazy",
|
||||
opts = {},
|
||||
}
|
||||
28
.config/nvim/lua/plugins/nvim-tree.lua
Normal file
28
.config/nvim/lua/plugins/nvim-tree.lua
Normal file
@@ -0,0 +1,28 @@
|
||||
return {
|
||||
-- fileexplorer on the side
|
||||
"nvim-tree/nvim-tree.lua",
|
||||
cmd = "NvimTreeToggle",
|
||||
dependencies = {
|
||||
{
|
||||
"nvim-tree/nvim-web-devicons",
|
||||
lazy = true,
|
||||
},
|
||||
},
|
||||
opts = {
|
||||
sort_by = "case_sensitive",
|
||||
view = {
|
||||
width = 30,
|
||||
},
|
||||
filters = {
|
||||
dotfiles = true,
|
||||
},
|
||||
renderer = {
|
||||
group_empty = true,
|
||||
icons = {
|
||||
glyphs = {
|
||||
git = Git_signs,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
36
.config/nvim/lua/plugins/nvim-treesitter.lua
Normal file
36
.config/nvim/lua/plugins/nvim-treesitter.lua
Normal file
@@ -0,0 +1,36 @@
|
||||
return {
|
||||
-- better language highlighting by improved parsing
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
build = ":TSUpdate",
|
||||
dependencies = {
|
||||
-- automatically close html-tags
|
||||
"windwp/nvim-ts-autotag",
|
||||
-- color brackets
|
||||
-- 'p00f/nvim-ts-rainbow',
|
||||
},
|
||||
config = function()
|
||||
require("nvim-treesitter.configs").setup({
|
||||
ensure_installed = {
|
||||
"bash",
|
||||
"css",
|
||||
"html",
|
||||
"markdown",
|
||||
"markdown_inline",
|
||||
"latex",
|
||||
"python",
|
||||
"rust",
|
||||
"lua",
|
||||
"yaml",
|
||||
},
|
||||
-- highlight = { enable = true },
|
||||
autotag = { enable = false },
|
||||
-- rainbow = {
|
||||
-- enable = true,
|
||||
-- extended_mode = true,
|
||||
-- max_file_lines = nil,
|
||||
-- -- colors = {},
|
||||
-- -- termcolors = {}
|
||||
-- }
|
||||
})
|
||||
end,
|
||||
}
|
||||
20
.config/nvim/lua/plugins/nvim-ufo.lua
Normal file
20
.config/nvim/lua/plugins/nvim-ufo.lua
Normal file
@@ -0,0 +1,20 @@
|
||||
return {
|
||||
-- folding improvements
|
||||
"kevinhwang91/nvim-ufo",
|
||||
dependencies = { "kevinhwang91/promise-async" },
|
||||
config = function()
|
||||
require("ufo").setup()
|
||||
vim.api.nvim_create_autocmd({ "BufEnter", "FileType" }, {
|
||||
pattern = { "*" },
|
||||
callback = function()
|
||||
require("ufo").closeAllFolds()
|
||||
end,
|
||||
})
|
||||
vim.api.nvim_create_autocmd({ "BufEnter", "FileType" }, {
|
||||
pattern = { "*" },
|
||||
callback = function()
|
||||
require("ufo").openAllFolds()
|
||||
end,
|
||||
})
|
||||
end,
|
||||
}
|
||||
8
.config/nvim/lua/plugins/oil.lua
Normal file
8
.config/nvim/lua/plugins/oil.lua
Normal file
@@ -0,0 +1,8 @@
|
||||
return {
|
||||
-- rename files in buffer
|
||||
"stevearc/oil.nvim",
|
||||
---@module 'oil'
|
||||
---@type oil.setupopts
|
||||
opts = {},
|
||||
dependencies = { "nvim-mini/mini.icons" },
|
||||
}
|
||||
12
.config/nvim/lua/plugins/outline.lua
Normal file
12
.config/nvim/lua/plugins/outline.lua
Normal file
@@ -0,0 +1,12 @@
|
||||
return {
|
||||
-- outline for code
|
||||
"hedyhli/outline.nvim",
|
||||
opts = {
|
||||
outline_window = {
|
||||
width = 25,
|
||||
},
|
||||
symbols = {
|
||||
icon_source = "lspkind",
|
||||
},
|
||||
},
|
||||
}
|
||||
7
.config/nvim/lua/plugins/renamer.lua
Normal file
7
.config/nvim/lua/plugins/renamer.lua
Normal file
@@ -0,0 +1,7 @@
|
||||
return {
|
||||
-- improved gui for renaming
|
||||
"filipdutescu/renamer.nvim",
|
||||
branch = "master",
|
||||
dependencies = { "nvim-lua/plenary.nvim" },
|
||||
opts = {},
|
||||
}
|
||||
12
.config/nvim/lua/plugins/spelunker.lua
Normal file
12
.config/nvim/lua/plugins/spelunker.lua
Normal file
@@ -0,0 +1,12 @@
|
||||
return {
|
||||
-- improve spelling check for coding to feature camelcase, etc
|
||||
{
|
||||
"kamykn/spelunker.vim",
|
||||
dependencies = { "kamykn/popup-menu.nvim" },
|
||||
config = function()
|
||||
-- vim.o.nospell = true
|
||||
vim.g.enable_spelunker_vim = 0
|
||||
vim.g.spelunker_disable_acronym_checking = 1
|
||||
end,
|
||||
},
|
||||
}
|
||||
13
.config/nvim/lua/plugins/tccs.lua
Normal file
13
.config/nvim/lua/plugins/tccs.lua
Normal file
@@ -0,0 +1,13 @@
|
||||
return {
|
||||
-- colorscheme
|
||||
{
|
||||
"tiyn/tccs.nvim",
|
||||
lazy = false,
|
||||
priority = 1000,
|
||||
config = function()
|
||||
require("tccs").setup({
|
||||
require("tccs").load(),
|
||||
})
|
||||
end,
|
||||
},
|
||||
}
|
||||
12
.config/nvim/lua/plugins/telescope.lua
Normal file
12
.config/nvim/lua/plugins/telescope.lua
Normal file
@@ -0,0 +1,12 @@
|
||||
return {
|
||||
-- fuzzy finder
|
||||
{
|
||||
"nvim-telescope/telescope.nvim",
|
||||
version = "0.1.2",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
"archie-judd/telescope-words.nvim",
|
||||
},
|
||||
opts = {},
|
||||
},
|
||||
}
|
||||
10
.config/nvim/lua/plugins/tidy.lua
Normal file
10
.config/nvim/lua/plugins/tidy.lua
Normal file
@@ -0,0 +1,10 @@
|
||||
return {
|
||||
-- clean up white spaces and empty lines before writing
|
||||
{
|
||||
"mcauley-penney/tidy.nvim",
|
||||
branch = "main",
|
||||
opts = {
|
||||
filetype_exclude = { "diff" },
|
||||
},
|
||||
},
|
||||
}
|
||||
22
.config/nvim/lua/plugins/todo-comments.lua
Normal file
22
.config/nvim/lua/plugins/todo-comments.lua
Normal file
@@ -0,0 +1,22 @@
|
||||
return {
|
||||
-- todo symbols and highlighting
|
||||
{
|
||||
"folke/todo-comments.nvim",
|
||||
dependencies = { "nvim-lua/plenary.nvim" },
|
||||
opts = {
|
||||
keywords = {
|
||||
ERRO = { icon = Error_sign, color = "error" },
|
||||
WARN = { icon = Warn_sign, color = "warning" },
|
||||
HACK = { icon = Hack_sign, color = "warning" },
|
||||
HINT = { icon = Hint_sign, color = "hint" },
|
||||
TODO = { icon = Todo_sign, color = "info" },
|
||||
INFO = { icon = Info_sign, color = "hint", alt = { "NOTE" } },
|
||||
PERF = { icon = Perfect_sign, color = "default" },
|
||||
TEST = { icon = Test_sign, color = "test" },
|
||||
},
|
||||
colors = {
|
||||
default = { "Operator" },
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
11
.config/nvim/lua/plugins/trouble.lua
Normal file
11
.config/nvim/lua/plugins/trouble.lua
Normal file
@@ -0,0 +1,11 @@
|
||||
return {
|
||||
-- list of errors
|
||||
"folke/trouble.nvim",
|
||||
dependencies = {
|
||||
{
|
||||
"nvim-tree/nvim-web-devicons",
|
||||
lazy = true,
|
||||
},
|
||||
},
|
||||
opts = {},
|
||||
}
|
||||
4
.config/nvim/lua/plugins/undotree.lua
Normal file
4
.config/nvim/lua/plugins/undotree.lua
Normal file
@@ -0,0 +1,4 @@
|
||||
return {
|
||||
-- tree style undo visualizer
|
||||
"mbbill/undotree",
|
||||
}
|
||||
5
.config/nvim/lua/plugins/vim-abolish.lua
Normal file
5
.config/nvim/lua/plugins/vim-abolish.lua
Normal file
@@ -0,0 +1,5 @@
|
||||
return {
|
||||
-- better substitutions
|
||||
"tpope/vim-abolish",
|
||||
config = function() end,
|
||||
}
|
||||
4
.config/nvim/lua/plugins/vim-illuminate.lua
Normal file
4
.config/nvim/lua/plugins/vim-illuminate.lua
Normal file
@@ -0,0 +1,4 @@
|
||||
return {
|
||||
-- highlight other occurences of the same word
|
||||
"RRethy/vim-illuminate",
|
||||
}
|
||||
7
.config/nvim/lua/plugins/vim-markdown.lua
Normal file
7
.config/nvim/lua/plugins/vim-markdown.lua
Normal file
@@ -0,0 +1,7 @@
|
||||
return {
|
||||
-- markdown improvements
|
||||
"preservim/vim-markdown",
|
||||
ft = { "markdown" },
|
||||
dependencies = { "godlygeek/tabular" },
|
||||
config = function() end,
|
||||
}
|
||||
8
.config/nvim/lua/plugins/viper-nvim.lua
Normal file
8
.config/nvim/lua/plugins/viper-nvim.lua
Normal file
@@ -0,0 +1,8 @@
|
||||
return {
|
||||
-- highlighting for the viper verification language
|
||||
"tiyn/viper.nvim",
|
||||
event = { "BufReadPre *.vpr", "FileType viper" },
|
||||
config = function()
|
||||
require("viper").setup()
|
||||
end,
|
||||
}
|
||||
4
.config/nvim/lua/plugins/which-key.lua
Normal file
4
.config/nvim/lua/plugins/which-key.lua
Normal file
@@ -0,0 +1,4 @@
|
||||
return {
|
||||
-- improved keybindings, previewing them
|
||||
"folke/which-key.nvim",
|
||||
}
|
||||
74
.config/nvim/lua/plugins/wilder.lua
Normal file
74
.config/nvim/lua/plugins/wilder.lua
Normal file
@@ -0,0 +1,74 @@
|
||||
return {
|
||||
-- improved wild menu
|
||||
{
|
||||
"gelguy/wilder.nvim",
|
||||
dependencies = {
|
||||
{
|
||||
"nvim-tree/nvim-web-devicons",
|
||||
lazy = true,
|
||||
},
|
||||
"roxma/nvim-yarp",
|
||||
"roxma/vim-hug-neovim-rpc",
|
||||
"romgrk/fzy-lua-native",
|
||||
"nixprime/cpsm",
|
||||
},
|
||||
config = function()
|
||||
local wilder = require("wilder")
|
||||
wilder.setup({
|
||||
modes = { ":", "/", "?" },
|
||||
accept_key = "<CR>",
|
||||
reject_key = "<C-e>",
|
||||
})
|
||||
wilder.set_option("pipeline", {
|
||||
wilder.branch(
|
||||
wilder.python_file_finder_pipeline({
|
||||
file_command = function(ctx, arg)
|
||||
if string.find(arg, ".") ~= nil then
|
||||
return { "fd", "-tf", "-H" }
|
||||
else
|
||||
return { "fd", "-tf" }
|
||||
end
|
||||
end,
|
||||
dir_command = { "fd", "-td" },
|
||||
filters = { "cpsm_filter" },
|
||||
}),
|
||||
wilder.substitute_pipeline({
|
||||
pipeline = wilder.python_search_pipeline({
|
||||
skip_cmdtype_check = 1,
|
||||
pattern = wilder.python_fuzzy_pattern({
|
||||
start_at_boundary = 0,
|
||||
}),
|
||||
}),
|
||||
}),
|
||||
wilder.cmdline_pipeline({
|
||||
fuzzy = 2,
|
||||
fuzzy_filter = wilder.lua_fzy_filter(),
|
||||
}),
|
||||
{
|
||||
wilder.check(function(ctx, x)
|
||||
return x == ""
|
||||
end),
|
||||
wilder.history(),
|
||||
},
|
||||
wilder.python_search_pipeline({
|
||||
pattern = wilder.python_fuzzy_pattern({
|
||||
start_at_boundary = 0,
|
||||
}),
|
||||
})
|
||||
),
|
||||
})
|
||||
local highlighters = {
|
||||
wilder.pcre2_highlighter(),
|
||||
wilder.lua_fzy_highlighter(),
|
||||
}
|
||||
wilder.set_option(
|
||||
"renderer",
|
||||
wilder.popupmenu_renderer({
|
||||
highlighter = highlighters,
|
||||
left = { " ", wilder.popupmenu_devicons() },
|
||||
right = { " ", wilder.popupmenu_scrollbar() },
|
||||
})
|
||||
)
|
||||
end,
|
||||
},
|
||||
}
|
||||
5
.config/nvim/lua/plugins/winshift.lua
Normal file
5
.config/nvim/lua/plugins/winshift.lua
Normal file
@@ -0,0 +1,5 @@
|
||||
return {
|
||||
-- improved movement of windows
|
||||
"sindrets/winshift.nvim",
|
||||
opts = {},
|
||||
}
|
||||
13
.config/nvim/lua/resources/header.tex
Normal file
13
.config/nvim/lua/resources/header.tex
Normal file
@@ -0,0 +1,13 @@
|
||||
% \usepackage[utf8]{inputenc}
|
||||
% \DeclareUnicodeCharacter{2605}{\ensuremath{\star}}
|
||||
%
|
||||
\usepackage{fontspec}
|
||||
\usepackage{newunicodechar}
|
||||
|
||||
\newfontfamily\symbolafont{Symbola}
|
||||
|
||||
% U+2605 BLACK STAR
|
||||
\newunicodechar{★}{{\symbolafont ★}}
|
||||
|
||||
% U+2606 WHITE STAR
|
||||
\newunicodechar{☆}{{\symbolafont ☆}}
|
||||
131
.config/nvim/lua/style.lua
Normal file
131
.config/nvim/lua/style.lua
Normal file
@@ -0,0 +1,131 @@
|
||||
-- set signs for various uses
|
||||
Return_sign = ""
|
||||
Space_sign = "·"
|
||||
|
||||
Reference_sign = "%s"
|
||||
Definition_sign = ""
|
||||
|
||||
Error_sign = " "
|
||||
Hack_sign = " "
|
||||
Hint_sign = " "
|
||||
Info_sign = " "
|
||||
Perfect_sign = " "
|
||||
Test_sign = " "
|
||||
Todo_sign = " "
|
||||
Warn_sign = " "
|
||||
|
||||
Menu_signs = {
|
||||
buffer = "",
|
||||
luasnip = "",
|
||||
nvim_lsp = "",
|
||||
path = "",
|
||||
}
|
||||
|
||||
Lsp_signs = {
|
||||
Array = "",
|
||||
Boolean = "⊥",
|
||||
Class = "",
|
||||
Color = "",
|
||||
Component = "",
|
||||
Constant = "π",
|
||||
Constructor = "",
|
||||
Enum = "",
|
||||
EnumMember = "",
|
||||
Event = "",
|
||||
Field = "■",
|
||||
File = "",
|
||||
Folder = "",
|
||||
Fragment = "",
|
||||
Function = "φ",
|
||||
Interface = "",
|
||||
Keyword = "",
|
||||
Method = "",
|
||||
Module = "",
|
||||
Namespace = "",
|
||||
Null = "∅",
|
||||
Number = "#",
|
||||
Object = "",
|
||||
Operator = "",
|
||||
Package = "",
|
||||
Property = "",
|
||||
Reference = "",
|
||||
Snippet = "",
|
||||
String = "",
|
||||
Struct = "",
|
||||
Text = "",
|
||||
TypeParameter = "",
|
||||
Unit = "",
|
||||
Value = "",
|
||||
Variable = "β",
|
||||
}
|
||||
|
||||
Install_signs = {
|
||||
package_installed = "",
|
||||
package_pending = "",
|
||||
package_uninstalled = "✗",
|
||||
}
|
||||
|
||||
Git_signs = {
|
||||
deleted = "",
|
||||
ignored = "",
|
||||
renamed = "",
|
||||
staged = "",
|
||||
unmerged = "",
|
||||
unstaged = "",
|
||||
untracked = "",
|
||||
}
|
||||
|
||||
Lazy_signs = {
|
||||
cmd = " ",
|
||||
config = " ",
|
||||
event = " ",
|
||||
ft = " ",
|
||||
import = " ",
|
||||
init = " ",
|
||||
keys = " ",
|
||||
lazy = " ",
|
||||
list = {
|
||||
"●",
|
||||
"➜",
|
||||
"",
|
||||
"",
|
||||
},
|
||||
loaded = " ",
|
||||
not_loaded = " ",
|
||||
plugin = " ",
|
||||
runtime = " ",
|
||||
source = " ",
|
||||
start = " ",
|
||||
task = " ",
|
||||
}
|
||||
|
||||
Lualine_signs = {
|
||||
modified = "",
|
||||
newfile = "",
|
||||
readonly = "",
|
||||
unnamed = "",
|
||||
}
|
||||
|
||||
vim.diagnostic.config({
|
||||
virtual_text = false,
|
||||
severity_sort = true,
|
||||
signs = {
|
||||
text = {
|
||||
[vim.diagnostic.severity.ERROR] = Error_sign,
|
||||
[vim.diagnostic.severity.WARN] = Warn_sign,
|
||||
[vim.diagnostic.severity.INFO] = Info_sign,
|
||||
[vim.diagnostic.severity.HINT] = Hint_sign,
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
-- enable colorcolumn when textwidth is set
|
||||
vim.o.cursorline = true
|
||||
vim.opt_local.colorcolumn = "+" .. vim.fn.join(vim.fn.range(0, 254), ",+")
|
||||
-- alternatively highlight only one line for colorcolumn
|
||||
-- vim.o.colorcolumn = "-0"
|
||||
|
||||
-- display certain invisible chars
|
||||
vim.o.list = true
|
||||
vim.opt.listchars:append("space:" .. Space_sign)
|
||||
vim.opt.listchars:append("eol:" .. Return_sign)
|
||||
Reference in New Issue
Block a user