diff --git a/.config/nvim/lua/core/config.lua b/.config/nvim/lua/core/config.lua index de5fdc0..005e339 100644 --- a/.config/nvim/lua/core/config.lua +++ b/.config/nvim/lua/core/config.lua @@ -2,6 +2,7 @@ vim.g.loaded = 1 vim.g.loaded_netrwPlugin = 1 vim.g.plug_install = 0 vim.opt.termguicolors = true +vim.opt.startofline = true vim.opt.shell = '/bin/bash' diff --git a/.config/nvim/lua/core/mappings.lua b/.config/nvim/lua/core/mappings.lua index b2182e1..bd37961 100644 --- a/.config/nvim/lua/core/mappings.lua +++ b/.config/nvim/lua/core/mappings.lua @@ -11,7 +11,7 @@ map('t', '', '', default_options) map('i', 'jj', '', default_options) map('i', 'jk', '', default_options) --map('i', ':w', ':w', default_options) -map('n', 'Q', 'q', default_options) +map('n', 'Q', 'q', default_options) -- Reselect visual block after incrementing/decrementing map('v', '', 'gv', default_options) @@ -30,7 +30,7 @@ map('n', '8', 'set tabstop=8 softtabstop=8 shiftwidth=8', defau map('n', '', 'nohlsearch', default_options) -- digraphs -map('i', 'd', 'lua require("better-digraphs").digraphs("i")', expr_options) +map('i', 'd', 'lua require("better-digraphs").digraphs("i")', default_options) -- femaco --map('n', 'fe'. 'FeMaCo', expr_options) @@ -40,13 +40,13 @@ map('n', 'i', 'lua require("FTerm").toggle()', default_options) map('t', 'i', 'lua require("FTerm").toggle()', default_options) -- icon picker -map('n', 'i', 'IconPickerNormal', expr_options) -map('n', 'y', 'IconPickerYank', expr_options) -map('i', 'i', 'IconPickerInsert', expr_options) +map('n', 'i', 'IconPickerNormal', default_options) +map('n', 'y', 'IconPickerYank', default_options) +map('i', 'i', 'IconPickerInsert', default_options) -- iswap -map('n', 'sw', 'ISwapWith', expr_options) -map('n', 'ss', 'ISwap', expr_options) +map('n', 'sw', 'ISwapWith', default_options) +map('n', 'ss', 'ISwap', default_options) -- code window require('codewindow').apply_default_keybinds() @@ -56,13 +56,13 @@ map('n', 'tt', 'NvimTreeToggle', default_options) map('n', 'tf', 'NvimTreeFindFile', default_options) -- other -map('n', 'oo', 'Other', default_options) -map('n', 'os', 'OtherSplit', default_options) -map('n', 'ov', 'OtherVSplit', default_options) -map('n', 'oc', 'OtherClear', default_options) +-- map('n', 'oo', 'Other', default_options) +-- map('n', 'os', 'OtherSplit', default_options) +-- map('n', 'ov', 'OtherVSplit', default_options) +-- map('n', 'oc', 'OtherClear', default_options) -- Context specific bindings -map('n', 'ot', 'Other test', default_options) -map('n', 'os', 'Other scss', default_options) +-- map('n', 'ot', 'Other test', default_options) +-- map('n', 'os', 'Other scss', default_options) -- quicknote map('n', 'qn', 'lua require("quicknote").NewNoteAtCurrentLine()', default_options) @@ -93,21 +93,18 @@ map('n', 'u', 'lua require("telescope").extensions.undo.undo()' map('n', 'cf', 'lua require("telescope").extensions.agrolens.agrolens({query="functions, labels"})', default_options) map('n', 'cc', 'lua require("telescope").extensions.agrolens.agrolens({query="callings"})', default_options) --- togger not active +-- toggler not active --vim.keymap.set({'n', 'v'}, 'gt', require('nvim-toggler').toggle) -- windows -map('n', 'z', " WindowsMaximize") -map('n', '_', " WindowsMaximizeVertically") -map('n', '|', " WindowsMaximizeHorizontally") -map('n', '=', "") +map('n', 'z', "WindowsMaximize", default_options) +map('n', '_', "WindowsMaximizeVertically", default_options) +map('n', '|', "WindowsMaximizeHorizontally", default_options) +map('n', '=', "WindowsEqualize", default_options) -- specs --- You can even bind it to search jumping and more, example: vim.api.nvim_set_keymap('n', 'n', 'n:lua require("specs").show_specs()', default_options) vim.api.nvim_set_keymap('n', 'N', 'N:lua require("specs").show_specs()', default_options) - --- Or maybe you do a lot of screen-casts and want to call attention to a specific line of code: vim.api.nvim_set_keymap('n', 'v', ':lua require("specs").show_specs({width = 97, winhl = "Search", delay_ms = 610, inc_ms = 21})', { noremap = true, silent = true }) vim.api.nvim_set_keymap('n', 'cb', ':lua require("nvim-navbuddy").open()', default_options) diff --git a/.config/nvim/lua/plugins/block.lua b/.config/nvim/lua/plugins/block.lua index 0d61676..144c78b 100644 --- a/.config/nvim/lua/plugins/block.lua +++ b/.config/nvim/lua/plugins/block.lua @@ -1,5 +1,6 @@ return { "HampusHauffman/block.nvim", + enabled = false, config = function() require("block").setup({}) end diff --git a/.config/nvim/lua/plugins/colorschemes.lua b/.config/nvim/lua/plugins/colorschemes.lua index 3b1dd7b..6015c4b 100644 --- a/.config/nvim/lua/plugins/colorschemes.lua +++ b/.config/nvim/lua/plugins/colorschemes.lua @@ -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 } } diff --git a/.config/nvim/lua/plugins/devdocs.lua b/.config/nvim/lua/plugins/devdocs.lua new file mode 100644 index 0000000..49923a6 --- /dev/null +++ b/.config/nvim/lua/plugins/devdocs.lua @@ -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 + } +} diff --git a/.config/nvim/lua/plugins/diffview.lua b/.config/nvim/lua/plugins/diffview.lua new file mode 100644 index 0000000..f49b7de --- /dev/null +++ b/.config/nvim/lua/plugins/diffview.lua @@ -0,0 +1,4 @@ +return { + "sindrets/diffview.nvim", + cmd = { "DiffviewFileHistory", "DiffviewOpen"} +} diff --git a/.config/nvim/lua/plugins/doxygen.lua b/.config/nvim/lua/plugins/doxygen.lua new file mode 100644 index 0000000..d6cdf40 --- /dev/null +++ b/.config/nvim/lua/plugins/doxygen.lua @@ -0,0 +1,6 @@ +return { + 'kkoomen/vim-doge', + config = function() + vim.cmd([[ let g:doge_doxygen_settings = { 'char': '@' } ]]) + end +} diff --git a/.config/nvim/lua/plugins/fold.lua b/.config/nvim/lua/plugins/fold.lua new file mode 100644 index 0000000..63b0f1b --- /dev/null +++ b/.config/nvim/lua/plugins/fold.lua @@ -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 +} diff --git a/.config/nvim/lua/plugins/gitsigns.lua b/.config/nvim/lua/plugins/gitsigns.lua index 57ed384..fdbcdd7 100644 --- a/.config/nvim/lua/plugins/gitsigns.lua +++ b/.config/nvim/lua/plugins/gitsigns.lua @@ -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 = { diff --git a/.config/nvim/lua/plugins/init.lua b/.config/nvim/lua/plugins/init.lua index 4194232..8be7266 100644 --- a/.config/nvim/lua/plugins/init.lua +++ b/.config/nvim/lua/plugins/init.lua @@ -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' } diff --git a/.config/nvim/lua/plugins/line.lua b/.config/nvim/lua/plugins/line.lua new file mode 100644 index 0000000..2c61bb0 --- /dev/null +++ b/.config/nvim/lua/plugins/line.lua @@ -0,0 +1,4 @@ +return { + "freddiehaddad/feline.nvim", + config = true +} diff --git a/.config/nvim/lua/plugins/lspconfig.lua b/.config/nvim/lua/plugins/lspconfig.lua index 0174826..0a91e42 100644 --- a/.config/nvim/lua/plugins/lspconfig.lua +++ b/.config/nvim/lua/plugins/lspconfig.lua @@ -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 } diff --git a/.config/nvim/lua/plugins/null.lua b/.config/nvim/lua/plugins/null.lua index 48e761b..2b86c45 100644 --- a/.config/nvim/lua/plugins/null.lua +++ b/.config/nvim/lua/plugins/null.lua @@ -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, diff --git a/.config/nvim/lua/plugins/repolink.lua b/.config/nvim/lua/plugins/repolink.lua new file mode 100644 index 0000000..8757a57 --- /dev/null +++ b/.config/nvim/lua/plugins/repolink.lua @@ -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 +} diff --git a/.config/nvim/lua/plugins/swap.lua b/.config/nvim/lua/plugins/swap.lua deleted file mode 100644 index 0135f66..0000000 --- a/.config/nvim/lua/plugins/swap.lua +++ /dev/null @@ -1,4 +0,0 @@ -return { - 'Wansmer/sibling-swap.nvim', - config = true -} diff --git a/.config/nvim/lua/plugins/symbol-usage.lua b/.config/nvim/lua/plugins/symbol-usage.lua new file mode 100644 index 0000000..5f60302 --- /dev/null +++ b/.config/nvim/lua/plugins/symbol-usage.lua @@ -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 +} diff --git a/.config/nvim/lua/plugins/treesitter.lua b/.config/nvim/lua/plugins/treesitter.lua index 929abec..027295b 100644 --- a/.config/nvim/lua/plugins/treesitter.lua +++ b/.config/nvim/lua/plugins/treesitter.lua @@ -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 } diff --git a/.config/nvim/lua/plugins/ufo.lua b/.config/nvim/lua/plugins/ufo.lua deleted file mode 100644 index 73e2ce7..0000000 --- a/.config/nvim/lua/plugins/ufo.lua +++ /dev/null @@ -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 -} diff --git a/.config/nvim/lua/plugins/wildmenu.lua b/.config/nvim/lua/plugins/wildmenu.lua new file mode 100644 index 0000000..6120bf4 --- /dev/null +++ b/.config/nvim/lua/plugins/wildmenu.lua @@ -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 +}