Nvim: add new plugins, optimize old

This commit is contained in:
Robert Kmieć
2023-09-23 01:21:02 +02:00
parent 48b7bcbf4f
commit ec0ae0ee13
19 changed files with 248 additions and 78 deletions

View File

@@ -1,5 +1,6 @@
return {
"HampusHauffman/block.nvim",
enabled = false,
config = function()
require("block").setup({})
end

View File

@@ -10,7 +10,7 @@ return {{
"wuelnerdotexe/vim-enfocado",
lazy = false,
config = function()
--vim.cmd([[ colorscheme enfoccado]])
--vim.cmd([[ colorscheme enfocado]])
end
},
{
@@ -52,7 +52,7 @@ return {{
"lifepillar/vim-gruvbox8",
lazy = false,
config = function()
vim.cmd([[ colorscheme gruvbox8]])
--vim.cmd([[ colorscheme gruvbox8]])
end
},
{
@@ -75,5 +75,19 @@ return {{
config = function()
--vim.cmd([[ colorscheme monokai]])
end
},
{
"dasupradyumna/midnight.nvim",
lazy = false,
config = function()
--vim.cmd([[ colorscheme midnight]])
end
},
{
"bluz71/vim-moonfly-colors",
lazy = false,
config = function()
vim.cmd([[ colorscheme moonfly]])
end
}
}

View File

@@ -0,0 +1,26 @@
return {
"luckasRanarison/nvim-devdocs",
dependencies = {
"nvim-lua/plenary.nvim",
"nvim-telescope/telescope.nvim",
"nvim-treesitter/nvim-treesitter",
},
opts = {
dir_path = vim.fn.stdpath("data") .. "/devdocs", -- installation directory
telescope = {}, -- passed to the telescope picker
float_win = { -- passed to nvim_open_win(), see :h api-floatwin
relative = "editor",
height = 25,
width = 100,
border = "rounded",
},
wrap = false, -- text wrap, only applies to floating window
previewer_cmd = nil, -- for example: "glow"
cmd_args = {}, -- example using glow: { "-s", "dark", "-w", "80" }
cmd_ignore = {}, -- ignore cmd rendering for the listed docs
picker_cmd = false, -- use cmd previewer in picker preview
picker_cmd_args = {}, -- example using glow: { "-p" }
ensure_installed = {}, -- get automatically installed
after_open = function(bufnr) end, -- callback that runs after the Devdocs window is opened. Devdocs buffer ID will be passed in
}
}

View File

@@ -0,0 +1,4 @@
return {
"sindrets/diffview.nvim",
cmd = { "DiffviewFileHistory", "DiffviewOpen"}
}

View File

@@ -0,0 +1,6 @@
return {
'kkoomen/vim-doge',
config = function()
vim.cmd([[ let g:doge_doxygen_settings = { 'char': '@' } ]])
end
}

View File

@@ -0,0 +1,29 @@
-- return {
-- 'anuvyklack/pretty-fold.nvim',
-- config = function()
-- require('pretty-fold').setup()
-- require('pretty-fold').ft_setup('cpp', {
-- process_comment_signs = false,
-- --comment_signs = {
-- -- '//', -- C++ Doxygen comments
-- --},
-- })
-- end
-- },
-- {
-- 'anuvyklack/fold-preview.nvim',
-- dependencies = 'anuvyklack/keymap-amend.nvim',
-- config = function()
-- require('fold-preview').setup({
-- -- Your configuration goes here.
-- })
-- end
-- },
return {
"chrisgrieser/nvim-origami",
event = "BufReadPost", -- later or on keypress would prevent saving folds
opts = true, -- needed even when using default config
enabled = false
}

View File

@@ -2,14 +2,14 @@ return {
'lewis6991/gitsigns.nvim',
opts = {
signs = {
add = {hl = 'GitSignsAdd' , text = '', numhl='GitSignsAddNr' , linehl='GitSignsAddLn'},
add = {hl = 'GitSignsAdd' , text = '+', numhl='GitSignsAddNr' , linehl='GitSignsAddLn'},
change = {hl = 'GitSignsChange', text = '', numhl='GitSignsChangeNr', linehl='GitSignsChangeLn'},
delete = {hl = 'GitSignsDelete', text = '_', numhl='GitSignsDeleteNr', linehl='GitSignsDeleteLn'},
topdelete = {hl = 'GitSignsDelete', text = '', numhl='GitSignsDeleteNr', linehl='GitSignsDeleteLn'},
changedelete = {hl = 'GitSignsChange', text = '~', numhl='GitSignsChangeNr', linehl='GitSignsChangeLn'},
},
signcolumn = true, -- Toggle with `:Gitsigns toggle_signs`
numhl = true, -- Toggle with `:Gitsigns toggle_numhl`
numhl = false, -- Toggle with `:Gitsigns toggle_numhl`
linehl = false, -- Toggle with `:Gitsigns toggle_linehl`
word_diff = false, -- Toggle with `:Gitsigns toggle_word_diff`
--keymaps = {

View File

@@ -3,7 +3,6 @@ return {{
--"vim-test/vim-test",
--"RRethy/vim-illuminate",
{ "ftilde/vim-ugdb", cmd = "UGDBBreakpoint" },
"HiPhish/nvim-ts-rainbow2",
-- }}}
-- }}}
@@ -37,29 +36,6 @@ return {{
--"junegunn/goyo.vim",
"protex/better-digraphs.nvim",
-- }}}
-- Appearance {{{
{
'anuvyklack/pretty-fold.nvim',
config = function()
require('pretty-fold').setup()
require('pretty-fold').ft_setup('cpp', {
process_comment_signs = false,
--comment_signs = {
-- '//', -- C++ Doxygen comments
--},
})
end
},
{
'anuvyklack/fold-preview.nvim',
dependencies = 'anuvyklack/keymap-amend.nvim',
config = function()
require('fold-preview').setup({
-- Your configuration goes here.
})
end
},
-- }}}
-- Testing phase {{{
--"RRethy/vim-hexokinase",, { 'do': 'make hexokinase' }

View File

@@ -0,0 +1,4 @@
return {
"freddiehaddad/feline.nvim",
config = true
}

View File

@@ -233,7 +233,7 @@ return {
settings = {
matlab = {
indexWorkspace = true,
installPath = "/home/kmcr/.local/usr/MATLAB/R2021b",
installPath = "/usr/local/MATLAB/R2022b",
matlabConnectionTiming = "onStart",
telemetry = true,
},
@@ -254,6 +254,6 @@ return {
-- debounce_text_changes = 150,
-- }
})
end
end
end
}

View File

@@ -5,7 +5,7 @@ return {
null_ls.setup({
sources = {
null_ls.builtins.formatting.stylua,
--null_ls.builtins.completion.spell,
null_ls.builtins.completion.spell,
null_ls.builtins.code_actions.gitsigns,
null_ls.builtins.diagnostics.cmake_lint,
null_ls.builtins.diagnostics.codespell,

View File

@@ -0,0 +1,101 @@
return {
"9seconds/repolink.nvim",
dependencies = {
"nvim-lua/plenary.nvim"
},
cmd = {
"RepoLink"
},
config = function()
-- ssh://git@git.viessmann.com:7999/sysfunc/hemsapplication.git
-- https://git.viessmann.com/projects/SYSFUNC/repos/hemsdocumentation/browse/README.md?useDefaultHandler=true#13
viessmann = function(args)
local anchor = "#" .. tostring(args.start_line)
return string.format(
"https://%s/projects/%s/repos/%s/browse/%s#%s",
args.host,
args.host_data.user,
args.host_data.project,
args.path,
anchor
)
end
-- ssh://git@git.viessmann.com:7999/sysfunc/hemsapplication.git
-- https://git.viessmann.com/projects/SYSFUNC/repos/hemsdocumentation/browse/README.md?useDefaultHandler=true#13
url_parser = function(remote_url)
vim.pretty_print(remote_url)
local host, group, project = string.match(remote_url,
"ssh://git@([^:]+):7999/([^/]+)/([^%.]+)")
return host, { user = group, project = project }
end
require("repolink").setup({
-- By default, repolink tries to create links with short commits
-- like, 42dd21c instead of 42dd21cf54779c9175c4ff7450d91a9ad0387491
-- If you like to have full commits, please enable this flag
use_full_commit_hash = false,
-- repolink takes remote URLs from git itself and can parse
-- most common ones: from Github, Bitbucket, Sourcehut, Gitlab, Gitea, etc.
-- but sometimes you can have a quite weird configuration, made with,
-- for example, cgit, so the default one won't work for you.
--
-- If you provide this custom parser, it should be a function that
-- parses a remote URL and returns a hostname and some data blob
-- that could be used later, on URL building.
--
-- host parameter would be used to find out a function that is used
-- to convert remote URL and repository data to an HTTP permalink
--
-- data parameter can be anything but you want to use the default URL
-- builders, it should be a table of
-- { user = "YOUR USER", project = "PROJECT NAME" }
--
-- Example of parser for git@github.com:9seconds/repolink.nvim.git URL:
--
-- function(remote_url)
-- local host, user, project = string.match(
-- remote_url,
-- "^git@([^:]+):([^/]+)/(.+)%.git$")
-- if host then
-- return host, {
-- user = user,
-- project = project
-- }
-- end
-- end
custom_url_parser = url_parser,
-- By default RepoLink just notifies about generated URL but if
-- this setting is not nil, then URL could also be copied into
-- a given register.
--
-- If you want to copy it into a register, run RepoLink! (with bang).
bang_register = "+",
-- repolink runs Git. Usually, it finishes quite fast but if you have a
-- slow storage, like NFS, can take some time. This is a timeout
-- after which repolink fails.
timeout = 5000,
url_builders = {
--["git.viessmann.com"] = require("repolink").url_builder_for_bitbucket("git.viessmann.com"),
["git.viessmann.com"] = viessmann,
}
-- {
-- start_line = 1
-- end_line = 2,
-- host = "github.com",
-- host_data = {
-- user = "9seconds",
-- project = "repolink.nvim"
-- },
-- commit_hash = "42dd21c",
-- path = "doc/repolink.txt",
-- }
})
end
}

View File

@@ -1,4 +0,0 @@
return {
'Wansmer/sibling-swap.nvim',
config = true
}

View File

@@ -0,0 +1,9 @@
return {
'Wansmer/symbol-usage.nvim',
event = 'BufReadPre', -- need run before LspAttach if you use nvim 0.9. On 0.10 use 'LspAttach'
config = function()
require('symbol-usage').setup({
vt_position = "textwidth"
})
end
}

View File

@@ -3,6 +3,8 @@ return {
dependencies = {
'mizlan/iswap.nvim',
'romgrk/nvim-treesitter-context',
'HiPhish/nvim-ts-rainbow2',
'Wansmer/sibling-swap.nvim',
--"nvim-treesitter/nvim-treesitter-textobjects",
--"nvim-treesitter/playground",
},
@@ -29,16 +31,21 @@ return {
"awk",
"bash",
"bibtex",
"bitbake",
"c",
"cmake",
--"comment",
"cpp",
"csv",
"devicetree",
"diff",
"fish",
"gitattributes",
"gitcommit",
"gitignore",
"git_config",
"git_rebase",
"html",
"vimdoc",
"http",
"ini",
@@ -49,6 +56,7 @@ return {
"make",
"markdown",
"markdown_inline",
"matlab",
"ninja",
"proto",
"python",
@@ -72,9 +80,9 @@ return {
},
},
rainbow = {
enable = true,
enable = false,
-- disable = { "jsx", "cpp" }, list of languages you want to disable the plugin for
extended_mode = true, -- Also highlight non-bracket delimiters like html tags, boolean or table: lang -> boolean
extended_mode = false, -- Also highlight non-bracket delimiters like html tags, boolean or table: lang -> boolean
max_file_lines = 5000, -- Do not enable for files with more than n lines, int
-- colors = {}, -- table of hex strings
-- termcolors = {} -- table of colour name strings
@@ -96,7 +104,8 @@ return {
include_match_words
},
}
vim.opt.foldmethod = "expr"
vim.opt.foldexpr = "nvim_treesitter#foldexpr()"
-- vim.opt.foldmethod = "expr"
-- vim.opt.foldexpr = "nvim_treesitter#foldexpr()"
require('sibling-swap').setup({})
end
}

View File

@@ -1,18 +0,0 @@
return {
'kevinhwang91/nvim-ufo',
dependencies = {
'kevinhwang91/promise-async',
},
config = function()
vim.wo.foldcolumn = '1'
vim.wo.foldlevel = 99 -- feel free to decrease the value
vim.wo.foldenable = true
-- tell the sever the capability of foldingRange
local capabilities = vim.lsp.protocol.make_client_capabilities()
capabilities.textDocument.foldingRange = {
dynamicRegistration = false,
lineFoldingOnly = true
}
end
}

View File

@@ -0,0 +1,15 @@
return {
"gelguy/wilder.nvim",
config = function()
local wilder = require('wilder')
wilder.setup({modes = {':', '/', '?'}})
wilder.set_option('renderer', wilder.popupmenu_renderer(
wilder.popupmenu_border_theme({
highlighter = wilder.basic_highlighter(),
min_width = '100%', -- minimum height of the popupmenu, can also be a number
min_height = '50%', -- to set a fixed height, set max_height to the same value
reverse = 0, -- if 1, shows the candidates from bottom to top
})
))
end
}