diff --git a/.config/nvim/after/available/airline.rc.lua b/.config/nvim/after/available/airline.rc.lua new file mode 100644 index 0000000..ea239f2 --- /dev/null +++ b/.config/nvim/after/available/airline.rc.lua @@ -0,0 +1,5 @@ +vim.g.airline_theme = 'minimalist' +vim.g.airline_powerline_fonts = 1 +vim.g.airline_stl_path_style = 'short' +vim.g.airline_highlighting_cache = 1 +vim.g.airline#extensions#searchcount#enabled = 0 diff --git a/.config/nvim/after/available/boole.rc.lua b/.config/nvim/after/available/boole.rc.lua new file mode 100644 index 0000000..2f822c9 --- /dev/null +++ b/.config/nvim/after/available/boole.rc.lua @@ -0,0 +1,18 @@ +require('boole').setup{ + mappings = { + increment = '', + decrement = '' + }, + -- User defined loops + additions = { + {'Foo', 'Bar'}, + {'tic', 'tac', 'toe'}, + {'light', 'dark'}, + {'phaseOne', 'phaseTwo', 'phaseThree'}, + {'PhaseOne', 'PhaseTwo', 'PhaseThree'}, + {'Enable', 'Disable'}, + {'ENABLE', 'DISABLE'}, + {'enable', 'disable'}, + {'zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine'}, + }, +} diff --git a/.config/nvim/after/available/comment.rc.lua b/.config/nvim/after/available/comment.rc.lua new file mode 100644 index 0000000..a844323 --- /dev/null +++ b/.config/nvim/after/available/comment.rc.lua @@ -0,0 +1 @@ +require('Comment').setup() diff --git a/.config/nvim/after/available/context.rc.lua b/.config/nvim/after/available/context.rc.lua new file mode 100644 index 0000000..e63bbca --- /dev/null +++ b/.config/nvim/after/available/context.rc.lua @@ -0,0 +1,35 @@ +-- " Configuration for context.vim +-- "" Disable context.vim on json files +-- ""let g:context_filetype_blacklist = ["json", "log"] +require'treesitter-context'.setup{ + enable = true, -- Enable this plugin (Can be enabled/disabled later via commands) + throttle = true, -- Throttles plugin updates (may improve performance) + max_lines = 0, -- How many lines the window should span. Values <= 0 mean no limit. + patterns = { -- Match patterns for TS nodes. These get wrapped to match at word boundaries. + -- For all filetypes + -- Note that setting an entry here replaces all other patterns for this entry. + -- By setting the 'default' entry below, you can control which nodes you want to + -- appear in the context window. + default = { + 'class', + 'function', + 'method', + 'for', + 'while', + 'if', + 'switch', + -- 'case', + }, + -- Example for a specific filetype. + -- If a pattern is missing, *open a PR* so everyone can benefit. + rust = { + 'impl_item', + }, + }, + exact_patterns = { + -- Example for a specific filetype with Lua patterns + -- Treat patterns.rust as a Lua pattern (i.e "^impl_item$" will + -- exactly match "impl_item" only) + rust = true, + } +} diff --git a/.config/nvim/after/available/crates.rc.lua b/.config/nvim/after/available/crates.rc.lua new file mode 100644 index 0000000..1f9edce --- /dev/null +++ b/.config/nvim/after/available/crates.rc.lua @@ -0,0 +1 @@ +require('crates').setup() diff --git a/.config/nvim/after/available/debugprint.rc.lua b/.config/nvim/after/available/debugprint.rc.lua new file mode 100644 index 0000000..2d1bdd3 --- /dev/null +++ b/.config/nvim/after/available/debugprint.rc.lua @@ -0,0 +1 @@ +require('debugprint').setup() diff --git a/.config/nvim/after/available/digraphs.rc.vim b/.config/nvim/after/available/digraphs.rc.vim new file mode 100644 index 0000000..a7b7bb6 --- /dev/null +++ b/.config/nvim/after/available/digraphs.rc.vim @@ -0,0 +1 @@ +inoremap lua require'better-digraphs'.digraphs("i") diff --git a/.config/nvim/after/available/dressing.rc.lua b/.config/nvim/after/available/dressing.rc.lua new file mode 100644 index 0000000..52de648 --- /dev/null +++ b/.config/nvim/after/available/dressing.rc.lua @@ -0,0 +1,159 @@ +require('dressing').setup({ + input = { + -- Set to false to disable the vim.ui.input implementation + enabled = true, + + -- Default prompt string + default_prompt = "Input:", + + -- Can be 'left', 'right', or 'center' + prompt_align = "left", + + -- When true, will close the modal + insert_only = true, + + -- When true, input will start in insert mode. + start_in_insert = true, + + -- These are passed to nvim_open_win + anchor = "SW", + border = "rounded", + -- 'editor' and 'win' will default to being centered + relative = "cursor", + + -- These can be integers or a float between 0 and 1 (e.g. 0.4 for 40%) + prefer_width = 40, + width = nil, + -- min_width and max_width can be a list of mixed types. + -- min_width = {20, 0.2} means "the greater of 20 columns or 20% of total" + max_width = { 140, 0.9 }, + min_width = { 20, 0.2 }, + + buf_options = {}, + win_options = { + -- Window transparency (0-100) + winblend = 10, + -- Disable line wrapping + wrap = false, + }, + + -- Set to `false` to disable + mappings = { + n = { + [""] = "Close", + [""] = "Confirm", + }, + i = { + [""] = "Close", + [""] = "Confirm", + [""] = "HistoryPrev", + [""] = "HistoryNext", + }, + }, + + override = function(conf) + -- This is the config that will be passed to nvim_open_win. + -- Change values here to customize the layout + return conf + end, + + -- see :help dressing_get_config + get_config = nil, + }, + select = { + -- Set to false to disable the vim.ui.select implementation + enabled = true, + + -- Priority list of preferred vim.select implementations + backend = { "telescope", "fzf_lua", "fzf", "builtin", "nui" }, + + -- Trim trailing `:` from prompt + trim_prompt = true, + + -- Options for telescope selector + -- These are passed into the telescope picker directly. Can be used like: + -- telescope = require('telescope.themes').get_ivy({...}) + telescope = nil, + + -- Options for fzf selector + fzf = { + window = { + width = 0.5, + height = 0.4, + }, + }, + + -- Options for fzf_lua selector + fzf_lua = { + winopts = { + width = 0.5, + height = 0.4, + }, + }, + + -- Options for nui Menu + nui = { + position = "50%", + size = nil, + relative = "editor", + border = { + style = "rounded", + }, + buf_options = { + swapfile = false, + filetype = "DressingSelect", + }, + win_options = { + winblend = 10, + }, + max_width = 80, + max_height = 40, + min_width = 40, + min_height = 10, + }, + + -- Options for built-in selector + builtin = { + -- These are passed to nvim_open_win + anchor = "NW", + border = "rounded", + -- 'editor' and 'win' will default to being centered + relative = "editor", + + buf_options = {}, + win_options = { + -- Window transparency (0-100) + winblend = 10, + }, + + -- These can be integers or a float between 0 and 1 (e.g. 0.4 for 40%) + -- the min_ and max_ options can be a list of mixed types. + -- max_width = {140, 0.8} means "the lesser of 140 columns or 80% of total" + width = nil, + max_width = { 140, 0.8 }, + min_width = { 40, 0.2 }, + height = nil, + max_height = 0.9, + min_height = { 10, 0.2 }, + + -- Set to `false` to disable + mappings = { + [""] = "Close", + [""] = "Close", + [""] = "Confirm", + }, + + override = function(conf) + -- This is the config that will be passed to nvim_open_win. + -- Change values here to customize the layout + return conf + end, + }, + + -- Used to override format_item. See :help dressing-format + format_item_override = {}, + + -- see :help dressing_get_config + get_config = nil, + }, +}) diff --git a/.config/nvim/after/available/femaco.rc.lua b/.config/nvim/after/available/femaco.rc.lua new file mode 100644 index 0000000..0727360 --- /dev/null +++ b/.config/nvim/after/available/femaco.rc.lua @@ -0,0 +1 @@ +require('femaco').setup() diff --git a/.config/nvim/after/available/fterm.rc.lua b/.config/nvim/after/available/fterm.rc.lua new file mode 100644 index 0000000..ce97b21 --- /dev/null +++ b/.config/nvim/after/available/fterm.rc.lua @@ -0,0 +1,45 @@ +require'FTerm'.setup({ + -- Filetype of the terminal buffer + ft = 'FTerm', + + -- Command to run inside the terminal. It could be a `string` or `table` + cmd = os.getenv('SHELL'), + + -- Neovim's native window border. See `:h nvim_open_win` for more configuration options. + border = 'double', + + -- Close the terminal as soon as shell/command exits. + -- Disabling this will mimic the native terminal behaviour. + auto_close = true, + + -- Highlight group for the terminal. See `:h winhl` + hl = 'Normal', + + -- Transparency of the floating window. See `:h winblend` + blend = 0, + + -- Object containing the terminal window dimensions. + -- The value for each field should be between `0` and `1` + dimensions = { + height = 0.9, -- Height of the terminal window + width = 0.9, -- Width of the terminal window + x = 0.5, -- X axis of the terminal window + y = 0.5, -- Y axis of the terminal window + }, + + -- Callback invoked when the terminal exits. + -- See `:h jobstart-options` + on_exit = nil, + + -- Callback invoked when the terminal emits stdout data. + -- See `:h jobstart-options` + on_stdout = nil, + + -- Callback invoked when the terminal emits stderr data. + -- See `:h jobstart-options` + on_stderr = nil, +}) + +-- Example keybindings +vim.keymap.set('n', 'i', 'lua require("FTerm").toggle()') +vim.keymap.set('t', 'i', 'lua require("FTerm").toggle()') diff --git a/.config/nvim/after/available/gitsigns.rc.lua b/.config/nvim/after/available/gitsigns.rc.lua new file mode 100644 index 0000000..ba4da77 --- /dev/null +++ b/.config/nvim/after/available/gitsigns.rc.lua @@ -0,0 +1,104 @@ +require('gitsigns').setup { + signs = { + 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` + linehl = false, -- Toggle with `:Gitsigns toggle_linehl` + word_diff = false, -- Toggle with `:Gitsigns toggle_word_diff` + --keymaps = { + -- -- Default keymap options + -- noremap = true, + + -- ['n ]c'] = { expr = true, "&diff ? ']c' : 'Gitsigns next_hunk'"}, + -- ['n [c'] = { expr = true, "&diff ? '[c' : 'Gitsigns prev_hunk'"}, + + -- ['n hs'] = 'Gitsigns stage_hunk', + -- ['v hs'] = 'Gitsigns stage_hunk', + -- ['n hu'] = 'Gitsigns undo_stage_hunk', + -- ['n hr'] = 'Gitsigns reset_hunk', + -- ['v hr'] = ':Gitsigns reset_hunk', + -- ['n hR'] = 'Gitsigns reset_buffer', + -- ['n hp'] = 'Gitsigns preview_hunk', + -- ['n hb'] = 'lua require"gitsigns".blame_line{full=true}', + -- ['n hS'] = 'Gitsigns stage_buffer', + -- ['n hU'] = 'Gitsigns reset_buffer_index', + + -- -- Text objects + -- ['o ih'] = 'Gitsigns select_hunk', + -- ['x ih'] = 'Gitsigns select_hunk' + --}, + on_attach = function(bufnr) + local gs = package.loaded.gitsigns + + local function map(mode, l, r, opts) + opts = opts or {} + opts.buffer = bufnr + vim.keymap.set(mode, l, r, opts) + end + + -- Navigation + map('n', ']c', function() + if vim.wo.diff then return ']c' end + vim.schedule(function() gs.next_hunk() end) + return '' + end, {expr=true}) + + map('n', '[c', function() + if vim.wo.diff then return '[c' end + vim.schedule(function() gs.prev_hunk() end) + return '' + end, {expr=true}) + + -- Actions + map({'n', 'v'}, 'hs', 'Gitsigns stage_hunk') + map({'n', 'v'}, 'hr', 'Gitsigns reset_hunk') + map('n', 'hS', gs.stage_buffer) + map('n', 'hu', gs.undo_stage_hunk) + map('n', 'hR', gs.reset_buffer) + map('n', 'hp', gs.preview_hunk) + map('n', 'hb', function() gs.blame_line{full=true} end) + map('n', 'tb', gs.toggle_current_line_blame) + map('n', 'hd', gs.diffthis) + map('n', 'hD', function() gs.diffthis('~') end) + map('n', 'td', gs.toggle_deleted) + + -- Text object + map({'o', 'x'}, 'ih', ':Gitsigns select_hunk') + end, + + watch_gitdir = { + interval = 1000, + follow_files = true + }, + attach_to_untracked = true, + current_line_blame = true, -- Toggle with `:Gitsigns toggle_current_line_blame` + current_line_blame_opts = { + virt_text = true, + virt_text_pos = 'eol', -- 'eol' | 'overlay' | 'right_align' + delay = 1000, + ignore_whitespace = true, + }, + current_line_blame_formatter_opts = { + relative_time = false + }, + sign_priority = 6, + update_debounce = 100, + status_formatter = nil, -- Use default + max_file_length = 40000, + preview_config = { + -- Options passed to nvim_open_win + border = 'single', + style = 'minimal', + relative = 'cursor', + row = 0, + col = 1 + }, + yadm = { + enable = true + }, +} diff --git a/.config/nvim/after/available/hlslens.rc.vim b/.config/nvim/after/available/hlslens.rc.vim new file mode 100644 index 0000000..f9c5b95 --- /dev/null +++ b/.config/nvim/after/available/hlslens.rc.vim @@ -0,0 +1,11 @@ +"noremap n execute('normal! ' . v:count1 . 'n') +" \lua require('hlslens').start() +"noremap N execute('normal! ' . v:count1 . 'N') +" \lua require('hlslens').start() +"noremap * *lua require('hlslens').start() +"noremap # #lua require('hlslens').start() +"noremap g* g*lua require('hlslens').start() +"noremap g# g#lua require('hlslens').start() +" +"" use : instead of +"nnoremap l :noh diff --git a/.config/nvim/after/available/icons.rc.lua b/.config/nvim/after/available/icons.rc.lua new file mode 100644 index 0000000..002e144 --- /dev/null +++ b/.config/nvim/after/available/icons.rc.lua @@ -0,0 +1,5 @@ +require("icon-picker") + +local opts = { noremap = true, silent = true } + +vim.keymap.set("n", "o", "PickIcons", opts) diff --git a/.config/nvim/after/available/illuminate.rc.lua b/.config/nvim/after/available/illuminate.rc.lua new file mode 100644 index 0000000..a8f26d9 --- /dev/null +++ b/.config/nvim/after/available/illuminate.rc.lua @@ -0,0 +1,42 @@ +--require('illuminate').configure({ +-- large_file_cutoff = 3000 +--}) + +HIGHLIGHT = 'highlight' +vim.api.nvim_create_augroup(HIGHLIGHT, { clear = true }) + +require('murmur').setup { + cursor_rgb = 'darkgreen', -- default to '#393939' + max_len = 80, -- maximum word-length to highlight + -- disable_on_lines = 2000, -- to prevent lagging on large files. Default to 2000 lines. + exclude_filetypes = {'log'}, + callbacks = { + -- to trigger the close_events of vim.diagnostic.open_float. + function () + -- Close floating diag. and make it triggerable again. + vim.cmd('doautocmd InsertEnter') + vim.w.diag_shown = false + end, + } +} +vim.api.nvim_create_autocmd('CursorHold', { + group = HIGHLIGHT, + pattern = '*', + callback = function () + -- skip when a float-win already exists. + if vim.w.diag_shown then return end + + -- open float-win when hovering on a cursor-word. + if vim.w.cursor_word ~= '' then + vim.diagnostic.open_float(nil, { + focusable = true, + close_events = { 'InsertEnter' }, + border = 'rounded', + source = 'always', + prefix = ' ', + scope = 'cursor', + }) + vim.w.diag_shown = true + end + end +}) diff --git a/.config/nvim/after/available/indent.rc.lua b/.config/nvim/after/available/indent.rc.lua new file mode 100644 index 0000000..3ed3e19 --- /dev/null +++ b/.config/nvim/after/available/indent.rc.lua @@ -0,0 +1,22 @@ +--require("indent_blankline").setup { +-- char = "", +-- show_current_context = true, +-- --show_current_context_start = true, +-- space_char_blankline = " ", +-- char_highlight_list = { +-- "IndentBlanklineIndent1", +-- "IndentBlanklineIndent2", +-- "IndentBlanklineIndent3", +-- "IndentBlanklineIndent4", +-- "IndentBlanklineIndent5", +-- "IndentBlanklineIndent6", +-- }, +-- space_char_highlight_list = { +-- "IndentBlanklineIndent1", +-- "IndentBlanklineIndent2", +-- "IndentBlanklineIndent3", +-- "IndentBlanklineIndent4", +-- "IndentBlanklineIndent5", +-- "IndentBlanklineIndent6", +-- }, +--} diff --git a/.config/nvim/after/available/iswap.rc.lua b/.config/nvim/after/available/iswap.rc.lua new file mode 100644 index 0000000..badcc1c --- /dev/null +++ b/.config/nvim/after/available/iswap.rc.lua @@ -0,0 +1,5 @@ +require('iswap').setup{} + +local opts = { noremap=true, silent=true } +vim.api.nvim_set_keymap('n', 'ta', 'ISwapWith', opts) +vim.api.nvim_set_keymap('n', 'tn', 'ISwap', opts) diff --git a/.config/nvim/after/available/knap.rc.lua b/.config/nvim/after/available/knap.rc.lua new file mode 100644 index 0000000..befd71c --- /dev/null +++ b/.config/nvim/after/available/knap.rc.lua @@ -0,0 +1,29 @@ +local gknapsettings = { + htmloutputext = "html", + htmltohtml = "touch %outputfile%", + htmltohtmlviewerlaunch = "google-chrome-beta %outputfile%", + htmltohtmlviewerrefresh = "none", + mdoutputext = "html", + mdtohtml = "pandoc --standalone %docroot% -o %outputfile%", + mdtohtmlviewerlaunch = "google-chrome-beta %outputfile%", + mdtohtmlviewerrefresh = "none", + mdtopdf = "pandoc %docroot% -o %outputfile%", + mdtopdfviewerlaunch = "sioyek %outputfile%", + mdtopdfviewerrefresh = "none", + markdownoutputext = "html", + markdowntohtml = "pandoc --standalone %docroot% -o %outputfile%", + markdowntohtmlviewerlaunch = "google-chrome-beta %outputfile%", + markdowntohtmlviewerrefresh = "none", + markdowntopdf = "pandoc %docroot% -o %outputfile%", + markdowntopdfviewerlaunch = "sioyek %outputfile%", + markdowntopdfviewerrefresh = "none", + texoutputext = "pdf", + textopdf = "pdflatex -interaction=batchmode -halt-on-error -synctex=1 %docroot%", + textopdfviewerlaunch = "sioyek --inverse-search 'nvim --headless -es --cmd \"lua require('\"'\"'knaphelper'\"'\"').relayjump('\"'\"'%servername%'\"'\"','\"'\"'%1'\"'\"',%2,%3)\"' --reuse-instance %outputfile%", + textopdfviewerrefresh = "none", + textopdfforwardjump = "sioyek --inverse-search 'nvim --headless -es --cmd \"lua require('\"'\"'knaphelper'\"'\"').relayjump('\"'\"'%servername%'\"'\"','\"'\"'%1'\"'\"',%2,%3)\"' --reuse-instance --forward-search-file %srcfile% --forward-search-line %line% %outputfile%", + textopdfshorterror = "A=%outputfile% ; LOGFILE=\"${A%.pdf}.log\" ; rubber-info \"$LOGFILE\" 2>&1 | head -n 1", + delay = 250 +} + +vim.g.knap_settings = gknapsettings diff --git a/.config/nvim/after/plugin/leap.rc.lua b/.config/nvim/after/available/leap.rc.lua similarity index 100% rename from .config/nvim/after/plugin/leap.rc.lua rename to .config/nvim/after/available/leap.rc.lua diff --git a/.config/nvim/after/available/lspconfig.rc.lua b/.config/nvim/after/available/lspconfig.rc.lua new file mode 100644 index 0000000..c828454 --- /dev/null +++ b/.config/nvim/after/available/lspconfig.rc.lua @@ -0,0 +1,150 @@ +local nvim_lsp = require('lspconfig') +local coq = require('coq') +local clangd_extensions = require('clangd_extensions') +local lsp_signature = require('lsp_signature') + +-- Mappings. +local opts = { noremap=true, silent=true } +vim.api.nvim_set_keymap('n', 'e', 'lua vim.diagnostic.open_float()', opts) +vim.api.nvim_set_keymap('n', '[d', 'lua vim.diagnostic.goto_prev()', opts) +vim.api.nvim_set_keymap('n', ']d', 'lua vim.diagnostic.goto_next()', opts) +vim.api.nvim_set_keymap('n', 'E', 'lua vim.diagnostic.set_loclist()', opts) +vim.api.nvim_set_keymap("n", "q", "lua vim.lsp.buf.format{ async = true }", opts) + +-- Use an on_attach function to only map the following keys +-- after the language server attaches to the current buffer +local on_attach = function(client, bufnr) + --Enable completion triggered by + vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc') + + ---- See `:help vim.lsp.*` for documentation on any of the below functions + vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gD', 'lua vim.lsp.buf.declaration()', opts) + vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gd', 'lua vim.lsp.buf.definition()', opts) + vim.api.nvim_buf_set_keymap(bufnr, 'n', 'K', 'lua vim.lsp.buf.hover()', opts) + vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gi', 'lua vim.lsp.buf.implementation()', opts) + vim.api.nvim_buf_set_keymap(bufnr, 'n', '', 'lua vim.lsp.buf.signature_help()', opts) + --vim.api.nvim_buf_set_keymap(bufnr, 'n', 'wa', 'lua vim.lsp.buf.add_workspace_folder()', opts) + --vim.api.nvim_buf_set_keymap(bufnr, 'n', 'wr', 'lua vim.lsp.buf.remove_workspace_folder()', opts) + --vim.api.nvim_buf_set_keymap(bufnr, 'n', 'wl', 'lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))', opts) + vim.api.nvim_buf_set_keymap(bufnr, 'n', 'D', 'lua vim.lsp.buf.type_definition()', opts) + vim.api.nvim_buf_set_keymap(bufnr, 'n', 'rn', 'lua vim.lsp.buf.rename()', opts) + vim.api.nvim_buf_set_keymap(bufnr, 'n', 'ca', 'lua vim.lsp.buf.code_action()', opts) + vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gr', 'lua vim.lsp.buf.references()', opts) + vim.api.nvim_buf_set_keymap(bufnr, 'n', '', 'ClangdSwitchSourceHeader', opts) + + -- require'illuminate'.on_attach(client) + require'virtualtypes'.on_attach() + require'lsp_signature'.on_attach({ + floating_window = true, + floating_window_above_cur_line = false, + floating_window_off_x = 500, + floating_window_off_y = -5, + }) +end + +local signs = { + { name = "DiagnosticSignError", text = "" }, + { name = "DiagnosticSignWarn", text = "" }, + { name = "DiagnosticSignHint", text = "" }, + { name = "DiagnosticSignInfo", text = "" }, + } + + for _, sign in ipairs(signs) do + vim.fn.sign_define(sign.name, { texthl = sign.name, text = sign.text, numhl = "" }) + end + +vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with( + vim.lsp.diagnostic.on_publish_diagnostics, { + signs = { + active = signs, + --severity_limit = 'info', + }, + severity_sort = true, + underline = false, + update_in_insert = false, + --virtual_text = { + -- spacing = 40, + -- severity_limit = 'Warning', + --}, + virtual_text = false, + } +) + +nvim_lsp.groovyls.setup (coq.lsp_ensure_capabilities({ + cmd = { "java", "-jar", "/home/kmcr/tools/groovy-language-server/build/libs/groovy-language-server-all.jar" }, + on_attach = on_attach, + on_publish_diagnostics = diagnostic_handler, + capabilities = vim.lsp.protocol.make_client_capabilities(), + }) +) + +-- nvim_lsp.ccls.setup( +-- coq.lsp_ensure_capabilities({ +-- init_options = { +-- compilationDatabaseDirectory = "."; +-- index = { +-- threads = 0; +-- }, +-- clang = { +-- excludeArgs = { "-frounding-math"} ; +-- }, +-- }, +-- root_dir = nvim_lsp.util.root_pattern("compile_commands.json"), +-- on_attach = on_attach, +-- on_publish_diagnostics = diagnostic_handler, +-- capabilities = cmp.update_capabilities(vim.lsp.protocol.make_client_capabilities()), +-- flags = { +-- debounce_text_changes = 150, +-- }} +-- ) +-- ) + +clangd_extensions.setup(coq.lsp_ensure_capabilities({ + server = { + on_attach = on_attach, + root_pattern = { + '.clangd', + '.clang-tidy', + '.clang-format', + 'compile_commands.json', + 'compile_flags.txt', + 'configure.ac', + } + }, + inlay_hints = { + max_len_align = true, + max_len_align_padding = 3, + right_align = true, + } +})) + +nvim_lsp.pylsp.setup(coq.lsp_ensure_capabilities({ + settings = { + pylint = { + enabled = false + }, + pyflakes = { + enabled = false, + }, + }, + flags = { + debounce_text_changes = 150, + }, + on_attach = on_attach, + on_publish_diagnostics = diagnostic_handler, + capabilities = vim.lsp.protocol.make_client_capabilities(), +})) + +-- Use a loop to conveniently call 'setup' on multiple servers and +-- map buffer local keybindings when the language server attaches +local servers = { "cmake", "rust_analyzer", "bashls" } +for _, lsp in ipairs(servers) do + nvim_lsp[lsp].setup(coq.lsp_ensure_capabilities({ + on_attach = on_attach, + on_publish_diagnostics = diagnostic_handler, + capabilities = vim.lsp.protocol.make_client_capabilities(), + flags = { + debounce_text_changes = 150, + } + })) +end diff --git a/.config/nvim/after/available/lualine.rc.lua b/.config/nvim/after/available/lualine.rc.lua new file mode 100644 index 0000000..738387d --- /dev/null +++ b/.config/nvim/after/available/lualine.rc.lua @@ -0,0 +1,222 @@ +-- Eviline config for lualine +-- Author: shadmansaleh +-- Credit: glepnir +local lualine = require('lualine') + +-- Color table for highlights +-- stylua: ignore +local colors = { + bg = '#202328', + fg = '#bbc2cf', + yellow = '#ECBE7B', + cyan = '#008080', + darkblue = '#081633', + green = '#98be65', + orange = '#FF8800', + violet = '#a9a1e1', + magenta = '#c678dd', + blue = '#51afef', + red = '#ec5f67', +} + + +local conditions = { + buffer_not_empty = function() + return vim.fn.empty(vim.fn.expand('%:t')) ~= 1 + end, + hide_in_width = function() + return vim.fn.winwidth(0) > 80 + end, + check_git_workspace = function() + local filepath = vim.fn.expand('%:p:h') + local gitdir = vim.fn.finddir('.git', filepath .. ';') + return gitdir and #gitdir > 0 and #gitdir < #filepath + end, +} + +-- Config +local config = { + options = { + -- Disable sections and component separators + component_separators = '', + section_separators = '', + theme = { + -- We are going to use lualine_c an lualine_x as left and + -- right section. Both are highlighted by c theme . So we + -- are just setting default looks o statusline + normal = { c = { fg = colors.fg, bg = colors.bg } }, + inactive = { c = { fg = colors.fg, bg = colors.bg } }, + }, + }, + sections = { + -- these are to remove the defaults + lualine_a = {}, + lualine_b = {}, + lualine_y = {}, + lualine_z = {}, + -- These will be filled later + lualine_c = {}, + lualine_x = {}, + }, + inactive_sections = { + -- these are to remove the defaults + lualine_a = {}, + lualine_b = {}, + lualine_y = {}, + lualine_z = {}, + lualine_c = {}, + lualine_x = {}, + }, +} + +-- Inserts a component in lualine_c at left section +local function ins_left(component) + table.insert(config.sections.lualine_c, component) +end + +-- Inserts a component in lualine_x ot right section +local function ins_right(component) + table.insert(config.sections.lualine_x, component) +end + +ins_left { + function() + return '▊' + end, + color = { fg = colors.blue }, -- Sets highlighting of component + padding = { left = 0, right = 1 }, -- We don't need space before this +} + +ins_left { + -- mode component + function() + return '' + end, + color = function() + -- auto change color according to neovims mode + local mode_color = { + n = colors.red, + i = colors.green, + v = colors.blue, + [''] = colors.blue, + V = colors.blue, + c = colors.magenta, + no = colors.red, + s = colors.orange, + S = colors.orange, + [''] = colors.orange, + ic = colors.yellow, + R = colors.violet, + Rv = colors.violet, + cv = colors.red, + ce = colors.red, + r = colors.cyan, + rm = colors.cyan, + ['r?'] = colors.cyan, + ['!'] = colors.red, + t = colors.red, + } + return { fg = mode_color[vim.fn.mode()] } + end, + padding = { right = 1 }, +} + +ins_left { + -- filesize component + 'filesize', + cond = conditions.buffer_not_empty, +} + +ins_left { + 'filename', + cond = conditions.buffer_not_empty, + color = { fg = colors.magenta, gui = 'bold' }, +} + +ins_left { 'location' } + +ins_left { 'progress', color = { fg = colors.fg, gui = 'bold' } } + +ins_left { + 'diagnostics', + sources = { 'nvim_diagnostic' }, + symbols = { error = ' ', warn = ' ', info = ' ' }, + diagnostics_color = { + color_error = { fg = colors.red }, + color_warn = { fg = colors.yellow }, + color_info = { fg = colors.cyan }, + }, +} + +-- Insert mid section. You can make any number of sections in neovim :) +-- for lualine it's any number greater then 2 +ins_left { + function() + return '%=' + end, +} + +ins_left { + -- Lsp server name . + function() + local msg = 'No Active Lsp' + local buf_ft = vim.api.nvim_buf_get_option(0, 'filetype') + local clients = vim.lsp.get_active_clients() + if next(clients) == nil then + return msg + end + for _, client in ipairs(clients) do + local filetypes = client.config.filetypes + if filetypes and vim.fn.index(filetypes, buf_ft) ~= -1 then + return client.name + end + end + return msg + end, + icon = ' LSP:', + color = { fg = '#ffffff', gui = 'bold' }, +} + +-- Add components to right sections +ins_right { + 'o:encoding', -- option component same as &encoding in viml + fmt = string.upper, -- I'm not sure why it's upper case either ;) + cond = conditions.hide_in_width, + color = { fg = colors.green, gui = 'bold' }, +} + +ins_right { + 'fileformat', + fmt = string.upper, + icons_enabled = true, -- I think icons are cool but Eviline doesn't have them. sigh + color = { fg = colors.green, gui = 'bold' }, +} + +ins_right { + 'branch', + icon = '', + color = { fg = colors.violet, gui = 'bold' }, +} + +ins_right { + 'diff', + -- Is it me or the symbol for modified us really weird + symbols = { added = ' ', modified = '柳 ', removed = ' ' }, + diff_color = { + added = { fg = colors.green }, + modified = { fg = colors.orange }, + removed = { fg = colors.red }, + }, + cond = conditions.hide_in_width, +} + +ins_right { + function() + return '▊' + end, + color = { fg = colors.blue }, + padding = { left = 1 }, +} + +-- Now don't forget to initialize lualine +lualine.setup(config) diff --git a/.config/nvim/after/available/md-preview.rc.vim b/.config/nvim/after/available/md-preview.rc.vim new file mode 100644 index 0000000..3e866c8 --- /dev/null +++ b/.config/nvim/after/available/md-preview.rc.vim @@ -0,0 +1 @@ +let g:mkdp_filetypes = ['markdown', 'plantuml'] diff --git a/.config/nvim/after/available/minimap.rc.lua b/.config/nvim/after/available/minimap.rc.lua new file mode 100644 index 0000000..3da1516 --- /dev/null +++ b/.config/nvim/after/available/minimap.rc.lua @@ -0,0 +1,4 @@ +local codewindow = require('codewindow') + +codewindow.setup() +codewindow.apply_default_keybinds() diff --git a/.config/nvim/after/available/mkdnflow.rc.lua b/.config/nvim/after/available/mkdnflow.rc.lua new file mode 100644 index 0000000..b0c1af7 --- /dev/null +++ b/.config/nvim/after/available/mkdnflow.rc.lua @@ -0,0 +1,88 @@ +require('mkdnflow').setup({ + modules = { + bib = true, + buffers = true, + conceal = true, + cursor = true, + folds = true, + links = true, + lists = true, + maps = true, + paths = true, + tables = true + }, + filetypes = {md = true, rmd = true, markdown = true}, + create_dirs = true, + perspective = { + priority = 'first', + fallback = 'current', + root_tell = false, + nvim_wd_heel = true + }, + wrap = false, + bib = { + default_path = nil, + find_in_root = true + }, + silent = false, + links = { + style = 'markdown', + conceal = false, + implicit_extension = nil, + transform_implicit = false, + transform_explicit = function(text) + text = text:gsub(" ", "-") + text = text:lower() + text = os.date('%Y-%m-%d_')..text + return(text) + end + }, + to_do = { + symbols = {' ', '-', 'X'}, + update_parents = true, + not_started = ' ', + in_progress = '-', + complete = 'X' + }, + tables = { + trim_whitespace = true, + format_on_move = true, + auto_extend_rows = false, + auto_extend_cols = false + }, + mappings = { + MkdnEnter = {{'n', 'v'}, ''}, + MkdnTab = false, + MkdnSTab = false, + MkdnNextLink = {'n', ''}, + MkdnPrevLink = {'n', ''}, + MkdnNextHeading = {'n', ']]'}, + MkdnPrevHeading = {'n', '[['}, + MkdnGoBack = {'n', ''}, + MkdnGoForward = {'n', ''}, + MkdnFollowLink = false, -- see MkdnEnter + MkdnDestroyLink = {'n', ''}, + MkdnTagSpan = {'v', ''}, + MkdnMoveSource = {'n', ''}, + MkdnYankAnchorLink = {'n', 'ya'}, + MkdnYankFileAnchorLink = {'n', 'yfa'}, + MkdnIncreaseHeading = {'n', '+'}, + MkdnDecreaseHeading = {'n', '-'}, + MkdnToggleToDo = {{'n', 'v'}, ''}, + MkdnNewListItem = false, + MkdnNewListItemBelowInsert = {'n', 'o'}, + MkdnNewListItemAboveInsert = {'n', 'O'}, + MkdnExtendList = false, + MkdnUpdateNumbering = {'n', 'nn'}, + MkdnTableNextCell = {'i', ''}, + MkdnTablePrevCell = {'i', ''}, + MkdnTableNextRow = false, + MkdnTablePrevRow = {'i', ''}, + MkdnTableNewRowBelow = {'n', 'ir'}, + MkdnTableNewRowAbove = {'n', 'iR'}, + MkdnTableNewColAfter = {'n', 'ic'}, + MkdnTableNewColBefore = {'n', 'iC'}, + MkdnFoldSection = {'n', 'f'}, + MkdnUnfoldSection = {'n', 'F'} + } +}) diff --git a/.config/nvim/after/available/neogen.rc.lua b/.config/nvim/after/available/neogen.rc.lua new file mode 100644 index 0000000..1bed6e1 --- /dev/null +++ b/.config/nvim/after/available/neogen.rc.lua @@ -0,0 +1,22 @@ +require("neogen").setup({ + --snippet_engine = 'ultisnips', + input_after_comment = true, +}) + +-- { +-- { nil, "///!", { no_results = true, type = { "func", "file", "class" } } }, +-- { nil, "///! @file", { no_results = true, type = { "file" } } }, +-- { nil, "///! * @brief $1", { no_results = true, type = { "func", "file", "class" } } }, +-- { nil, "", { no_results = true, type = { "func", "file", "class" } } }, +-- { nil, "", { no_results = true, type = { "file" } } }, +-- +-- { nil, "/**", { type = { "func", "class", "type" } } }, +-- { i.ClassName, " * @class %s", { type = { "class" } } }, +-- { i.Type, " * @typedef %s", { type = { "type" } } }, +-- { nil, " * @brief $1", { type = { "func", "class", "type" } } }, +-- { nil, " *", { type = { "func", "class", "type" } } }, +-- { i.Tparam, " * @tparam %s $1" }, +-- { i.Parameter, " * @param %s $1" }, +-- { i.Return, " * @return $1" }, +-- { nil, " */", { type = { "func", "class", "type" } } }, +-- } diff --git a/.config/nvim/after/available/neorg.rc.lua b/.config/nvim/after/available/neorg.rc.lua new file mode 100644 index 0000000..d34447e --- /dev/null +++ b/.config/nvim/after/available/neorg.rc.lua @@ -0,0 +1,14 @@ +require('neorg').setup { + load = { + ["core.defaults"] = {}, + ["core.norg.dirman"] = { + config = { + workspaces = { + work = "~/notes/work", + home = "~/notes/home", + } + } + }, + ["core.norg.concealer"] = {}, + } +} diff --git a/.config/nvim/after/available/neoscroll.rc.lua b/.config/nvim/after/available/neoscroll.rc.lua new file mode 100644 index 0000000..5b86db6 --- /dev/null +++ b/.config/nvim/after/available/neoscroll.rc.lua @@ -0,0 +1,13 @@ +-- require('neoscroll').setup({ +-- -- All these keys will be mapped to their corresponding default scrolling animation +-- mappings = {'', '', '', '', +-- '', '', 'zt', 'zz', 'zb'}, +-- hide_cursor = true, -- Hide cursor while scrolling +-- stop_eof = true, -- Stop at when scrolling downwards +-- use_local_scrolloff = false, -- Use the local scope of scrolloff instead of the global scope +-- respect_scrolloff = false, -- Stop scrolling when the cursor reaches the scrolloff margin of the file +-- cursor_scrolls_alone = true, -- The cursor will keep on scrolling even if the window cannot scroll further +-- easing_function = nil, -- Default easing function +-- pre_hook = nil, -- Function to run before the scrolling animation starts +-- post_hook = nil, -- Function to run after the scrolling animation ends +-- }) diff --git a/.config/nvim/after/available/nvim-cmp.rc.lua b/.config/nvim/after/available/nvim-cmp.rc.lua new file mode 100644 index 0000000..3d983f0 --- /dev/null +++ b/.config/nvim/after/available/nvim-cmp.rc.lua @@ -0,0 +1,73 @@ +-- Setup nvim-cmp. +--local cmp = require'cmp' +-- +--cmp.setup({ +-- snippet = { +-- expand = function(args) +-- -- For `vsnip` user. +-- -- vim.fn["vsnip#anonymous"](args.body) +-- +-- -- For `luasnip` user. +-- -- require('luasnip').lsp_expand(args.body) +-- +-- -- For `ultisnips` user. +-- vim.fn["UltiSnips#Anon"](args.body) +-- end, +-- }, +-- mapping = cmp.mapping.preset.insert({ +-- [''] = cmp.mapping(cmp.mapping.scroll_docs(-4), { 'i', 'c' }), +-- [''] = cmp.mapping(cmp.mapping.scroll_docs(4), { 'i', 'c' }), +-- [''] = cmp.mapping(cmp.mapping.complete(), { 'i', 'c' }), +-- [''] = cmp.mapping.confirm({ select = true }), +-- [''] = cmp.mapping({ +-- i = cmp.mapping.abort(), +-- c = cmp.mapping.close(), +-- }), +-- }), +-- sources = cmp.config.sources({ +-- { name = 'nvim_lsp' }, +-- +-- { name = 'path' }, +-- +-- { name = 'ultisnips' }, +-- +-- { name = 'calc' }, +-- +-- { name = 'cmp_matlab' }, +-- +-- { name = 'cmp_git' }, +-- }, { +-- { name = 'buffer', keyword_length = 5, max_item_count = 10, priority = -5 }, +-- }), +-- --experimental = { +-- -- native_menu = false +-- --} +-- +-- sorting = { +-- comparators = { +-- cmp.config.compare.offset, +-- cmp.config.compare.exact, +-- cmp.config.compare.recently_used, +-- require("clangd_extensions.cmp_scores"), +-- cmp.config.compare.kind, +-- cmp.config.compare.sort_text, +-- cmp.config.compare.length, +-- cmp.config.compare.order, +-- }, +-- }, +--}) +-- +--cmp.setup.cmdline('/', { +-- sources = { +-- { name = 'buffer' } +-- } +--}) +-- +--cmp.setup.cmdline(':', { +-- sources = { +-- { name = 'cmdline' } +-- }, +-- mapping = cmp.mapping.preset.cmdline() +--}) +-- +--require("cmp_git").setup() diff --git a/.config/nvim/after/available/nvim-dap.rc.lua b/.config/nvim/after/available/nvim-dap.rc.lua new file mode 100644 index 0000000..e69de29 diff --git a/.config/nvim/after/plugin/nvim-tree.rc.vim b/.config/nvim/after/available/nvim-tree.rc.lua similarity index 60% rename from .config/nvim/after/plugin/nvim-tree.rc.vim rename to .config/nvim/after/available/nvim-tree.rc.lua index b275ca5..18a7de8 100644 --- a/.config/nvim/after/plugin/nvim-tree.rc.vim +++ b/.config/nvim/after/available/nvim-tree.rc.lua @@ -1,39 +1,25 @@ -let g:nvim_tree_refresh_wait = 1000 " control how often the tree can be refreshed, 1000 means the tree can be refresh once per 1000ms. -" Dictionary of buffer option names mapped to a list of option values that -" indicates to the window picker that the buffer's window should not be -" selectable. -"If 0, do not show the icons for one of 'git' 'folder' and 'files' -"1 by default, notice that if 'files' is 1, it will only display -"if nvim-web-devicons is installed and on your runtimepath. -"if folder is 1, you can also tell folder_arrows 1 to show small arrows next to the folder icons. -"but this will not work when you set indent_markers (because of UI conflict) +local opts = { noremap = true, silent = true } -" default will show icon by default if no icon is provided -" default shows no icon by default +vim.keymap.set("n", "tt", "NvimTreeToggle", opts) +vim.keymap.set("n", "tf", "NvimTreeFindFile", opts) -nnoremap tt :NvimTreeToggle -"nnoremap r :NvimTreeRefresh -nnoremap tf :NvimTreeFindFile -" NvimTreeOpen, NvimTreeClose, NvimTreeFocus, NvimTreeFindFileToggle, and NvimTreeResize are also available if you need them +vim.g.nvim_tree_refresh_wait = 1000 -"set termguicolors " this variable must be enabled for colors to be applied properly - -" a list of groups can be found at `:help nvim_tree_highlight` -"highlight NvimTreeFolderIcon guibg=blue - -lua << EOF -- following options are the default -- each of these are documented in `:help nvim-tree.OPTION_NAME` require'nvim-tree'.setup { - disable_netrw = true, - hijack_netrw = true, - open_on_setup = false, - ignore_ft_on_setup = {}, - open_on_tab = false, - hijack_cursor = true, - update_cwd = false, - respect_buf_cwd = false, + disable_netrw = true, + hijack_netrw = true, + open_on_setup = true, + ignore_ft_on_setup = {}, + open_on_tab = false, + hijack_cursor = true, + update_cwd = false, create_in_closed_folder = false, + hijack_unnamed_buffer_when_opening = true, + sync_root_with_cwd = true, + reload_on_bufenter = true, + respect_buf_cwd = false, hijack_directories = { enable = true, auto_open = true, @@ -66,8 +52,7 @@ require'nvim-tree'.setup { timeout = 500, }, view = { - width = 30, - height = 30, + width = 35, hide_root_folder = true, side = 'left', mappings = { @@ -145,4 +130,3 @@ require'nvim-tree'.setup { }, }, } -EOF diff --git a/.config/nvim/after/available/other.rc.lua b/.config/nvim/after/available/other.rc.lua new file mode 100644 index 0000000..8f1bac9 --- /dev/null +++ b/.config/nvim/after/available/other.rc.lua @@ -0,0 +1,67 @@ +-- Plug 'rgroli/other.nvim' + +require("other-nvim").setup({ + mappings = { + -- custom mapping + { + pattern = "/src/(.*).cpp$", + target = "/include/%1.hpp", + transformer = "lowercase", + context = "header" + }, + { + pattern = "/src/(.*).cpp$", + target = "/include/%1.h", + transformer = "lowercase", + context = "header" + }, + { + pattern = "/src/(.*).hpp$", + target = "/include/%1.cpp", + transformer = "lowercase", + context = "source" + }, + { + pattern = "/include/(.*).hpp$", + target = "/src/%1.cpp", + transformer = "lowercase", + context = "source" + }, + { + pattern = "/include/(.*).h$", + target = "/src/%1.cpp", + transformer = "lowercase", + context = "source" + } + }, + transformers = { + -- defining a custom transformer + lowercase = function (inputString) + return inputString:lower() + end + }, + style = { + -- How the plugin paints its window borders + -- Allowed values are none, single, double, rounded, solid and shadow + border = "solid", + + -- Column seperator for the window + seperator = "|", + + -- width of the window in percent. e.g. 0.5 is 50%, is 100% + width = 0.7, + + -- min height in rows. + -- when more columns are needed this value is extended automatically + minHeight = 2 + }, +}) + +vim.api.nvim_set_keymap("n", "ll", ":Other", { noremap = true, silent = true }) +vim.api.nvim_set_keymap("n", "lp", ":OtherSplit", { noremap = true, silent = true }) +vim.api.nvim_set_keymap("n", "lv", ":OtherVSplit", { noremap = true, silent = true }) +vim.api.nvim_set_keymap("n", "lc", ":OtherClear", { noremap = true, silent = true }) + +-- Context specific bindings +vim.api.nvim_set_keymap("n", "lt", ":Other test", { noremap = true, silent = true }) +vim.api.nvim_set_keymap("n", "ls", ":Other scss", { noremap = true, silent = true }) diff --git a/.config/nvim/after/available/peek.rc.lua b/.config/nvim/after/available/peek.rc.lua new file mode 100644 index 0000000..f2ea07e --- /dev/null +++ b/.config/nvim/after/available/peek.rc.lua @@ -0,0 +1,34 @@ +-- default config: +require('peek').setup({ + auto_load = true, -- whether to automatically load preview when + -- entering another markdown buffer + close_on_bdelete = true, -- close preview window on buffer delete + + syntax = true, -- enable syntax highlighting, affects performance + + theme = 'dark', -- 'dark' or 'light' + + update_on_change = true, + + -- relevant if update_on_change is true + throttle_at = 200000, -- start throttling when file exceeds this + -- amount of bytes in size + throttle_time = 'auto', -- minimum amount of time in milliseconds + -- that has to pass before starting new render +}) + +local peek = require('peek') + +vim.api.nvim_create_user_command('PeekOpen', function() + if not peek.is_open() and vim.bo[vim.api.nvim_get_current_buf()].filetype == 'markdown' then + vim.fn.system('i3-msg split horizontal') + peek.open() + end +end, {}) + +vim.api.nvim_create_user_command('PeekClose', function() + if peek.is_open() then + peek.close() + vim.fn.system('i3-msg move left') + end +end, {}) diff --git a/.config/nvim/after/available/screenshot.rc.lua b/.config/nvim/after/available/screenshot.rc.lua new file mode 100644 index 0000000..b763300 --- /dev/null +++ b/.config/nvim/after/available/screenshot.rc.lua @@ -0,0 +1,43 @@ +--Plug 'nvim-lua/plenary.nvim' +--Plug 'narutoxy/silicon.lua' + +-- Not working well +-- silicon = require('silicon') +-- silicon.setup( +-- { +-- theme = "auto", +-- output = "SILICON_${year}-${month}-${date}_${time}.png", -- auto generate file name based on time (absolute or relative to cwd) +-- bgColor = vim.g.terminal_color_5, +-- bgImage = "", -- path to image, must be png +-- roundCorner = true, +-- windowControls = true, +-- lineNumber = true, +-- font = "monospace", +-- lineOffset = 1, -- from where to start line number +-- linePad = 2, -- padding between lines +-- padHoriz = 80, -- Horizontal padding +-- padVert = 100, -- vertical padding +-- shadowBlurRadius = 10, +-- shadowColor = "#555555", +-- shadowOffsetX = 8, +-- shadowOffsetY = 8, +-- gobble = false, -- enable lsautogobble like feature +-- debug = true, -- enable debug output +-- } +-- ) +-- +-- -- Generate image of lines in a visual selection +-- vim.keymap.set('v', 's', function() silicon.visualise_api({to_clip = false, show_buf = false}) end ) +-- -- Generate image of a whole buffer, with lines in a visual selection highlighted +-- vim.keymap.set('v', 'bs', function() silicon.visualise_api({to_clip = false, show_buf = true}) end ) +-- -- Generate visible portion of a buffer +-- --vim.keymap.set('n', 's', function() silicon.visualise_api({to_clip = true, visible = true}) end ) +-- -- Generate current buffer line in normal mode +-- --vim.keymap.set('n', 's', function() silicon.visualise_api({to_clip = true}) end ) + + +-- Time for silicon.nvim +require('silicon').setup({ + font = 'FantasqueSansMono Nerd Font=16', + theme = 'Monokai Extended', +}) diff --git a/.config/nvim/after/available/search-pulse.rc.vim b/.config/nvim/after/available/search-pulse.rc.vim new file mode 100644 index 0000000..56fbd58 --- /dev/null +++ b/.config/nvim/after/available/search-pulse.rc.vim @@ -0,0 +1,2 @@ +let g:vim_search_pulse_mode = 'pattern' +let g:vim_search_pulse_duration = 400 diff --git a/.config/nvim/after/available/startify.rc.vim b/.config/nvim/after/available/startify.rc.vim new file mode 100644 index 0000000..9a67c9e --- /dev/null +++ b/.config/nvim/after/available/startify.rc.vim @@ -0,0 +1 @@ +let g:startify_custom_header = '' diff --git a/.config/nvim/after/available/telescope.rc.vim b/.config/nvim/after/available/telescope.rc.vim new file mode 100644 index 0000000..ff94c67 --- /dev/null +++ b/.config/nvim/after/available/telescope.rc.vim @@ -0,0 +1,34 @@ +" Find files using Telescope command-line sugar. +"nnoremap f Telescope find_files +"nnoremap g Telescope live_grep +"nnoremap b Telescope buffers +"nnoremap fh Telescope help_tags + +lua << EOF + +-- require('telescope').load_extension('ultisnips') + +EOF + +" Using Lua functions +nnoremap f lua require('telescope.builtin').find_files() +nnoremap a lua require('telescope.builtin').grep_string() +nnoremap A lua require('telescope.builtin').live_grep() +nnoremap b lua require('telescope.builtin').buffers() +nnoremap r lua require('telescope.builtin').resume() +"nnoremap fh lua require('telescope.builtin').help_tags() +nnoremap tc lua require('telescope.builtin').commands() +nnoremap t: lua require('telescope.builtin').command_history() +nnoremap t/ lua require('telescope.builtin').search_history() +nnoremap tr lua require('telescope.builtin').registers() + +" Neovim lsp pickers +nnoremap tr lua require('telescope.builtin').lsp_references() +nnoremap td lua require('telescope.builtin').lsp_definitions() + +" git pickers +nnoremap gc lua require('telescope.builtin').git_commits() +nnoremap gC lua require('telescope.builtin').git_bcommits() +nnoremap gb lua require('telescope.builtin').git_branches() + +" nnoremap s lua require('telescope').extensions.ultisnips.ultisnips() diff --git a/.config/nvim/after/available/themer.rc.lua b/.config/nvim/after/available/themer.rc.lua new file mode 100644 index 0000000..1abe3c3 --- /dev/null +++ b/.config/nvim/after/available/themer.rc.lua @@ -0,0 +1,11 @@ +--require("themer").setup({ +-- colorscheme = "scery", +-- enable_installer = true, +-- styles = { +-- ["function"] = { style = 'italic' }, +-- functionbuiltin = { style = 'italic' }, +-- variable = { style = 'italic' }, +-- variableBuiltIn = { style = 'italic' }, +-- parameter = { style = 'italic' }, +-- }, +--}) diff --git a/.config/nvim/after/available/toggler.rc.lua b/.config/nvim/after/available/toggler.rc.lua new file mode 100644 index 0000000..e6eac25 --- /dev/null +++ b/.config/nvim/after/available/toggler.rc.lua @@ -0,0 +1,9 @@ +require('nvim-toggler').setup({ + inverses = { + ['vim'] = 'emacs' + }, + -- removes the default i keymap + remove_default_keybinds = true, +}) + +vim.keymap.set({'n', 'v'}, 'gt', require('nvim-toggler').toggle) diff --git a/.config/nvim/after/available/treesitter.rc.lua b/.config/nvim/after/available/treesitter.rc.lua new file mode 100644 index 0000000..c225a5d --- /dev/null +++ b/.config/nvim/after/available/treesitter.rc.lua @@ -0,0 +1,58 @@ +-- Tree-sitter configuration + +ts = require'nvim-treesitter.configs' + +ts.setup { + highlight = { + enable = true, + additional_vim_regex_highlighting = false, + }, + ensure_installed = { + "bash", + "c", + "cmake", + "cpp", + "fish", + "lua", + "rust", + }, + -- disabled, since it mostly shifts to four characters + --indent = { + -- enable = true, + --}, + incremental_selection = { + enable = true, + keymaps = { + init_selection = "ti", + node_incremental = "ti", + scope_incremental = "ts", + node_decremental = "td", + }, + }, + rainbow = { + enable = true, + -- 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 + max_file_lines = 10000, -- Do not enable for files with more than n lines, int + -- colors = {}, -- table of hex strings + -- termcolors = {} -- table of colour name strings + }, + --textobjects = { + -- swap = { + -- enable = true, + -- swap_next = { + -- ["tan"] = "@parameter.inner", + -- }, + -- swap_previous = { + -- ["tap"] = "@parameter.inner", + -- }, + -- }, + --}, + matchup = { + enable = true, + -- disable = { "c", "ruby" }, + include_match_words + }, +} +vim.opt.foldmethod = "expr" +vim.opt.foldexpr = "nvim_treesitter#foldexpr()" diff --git a/.config/nvim/after/available/ufo.rc.lua b/.config/nvim/after/available/ufo.rc.lua new file mode 100644 index 0000000..058f962 --- /dev/null +++ b/.config/nvim/after/available/ufo.rc.lua @@ -0,0 +1,12 @@ +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 +} + +--require('ufo').setup() diff --git a/.config/nvim/after/available/ultisnips.rc.vim b/.config/nvim/after/available/ultisnips.rc.vim new file mode 100644 index 0000000..4c43e2d --- /dev/null +++ b/.config/nvim/after/available/ultisnips.rc.vim @@ -0,0 +1,8 @@ +" Set completeopt to have a better completion experience +"set completeopt=menuone,noinsert,noselect +let g:completion_enable_snippet = 'UltiSnips' +"iunmap +"map =UltiSnips#ExpandSnippet() +"let g:UltiSnipsExpandTrigger="" +let g:UltiSnipsJumpForwardTrigger="" +let g:UltiSnipsJumpBackwardTrigger="" diff --git a/.config/nvim/after/available/vim-cmake.rc.vim b/.config/nvim/after/available/vim-cmake.rc.vim new file mode 100644 index 0000000..29e52d7 --- /dev/null +++ b/.config/nvim/after/available/vim-cmake.rc.vim @@ -0,0 +1,13 @@ +let g:cmake_build_options = [ "-j10" ] + +let g:cmake_root_markers = ['.svn'] + + +let g:cmake_jump_on_error = 0 " We do not want to focus the console +augroup vim-cmake-group +autocmd User CMakeBuildFailed :cfirst +augroup END + +augroup vim-cmake-group +autocmd! User CMakeBuildSucceeded CMakeClose +augroup END diff --git a/.config/nvim/after/available/vim-test.rc.vim b/.config/nvim/after/available/vim-test.rc.vim new file mode 100644 index 0000000..21f5c47 --- /dev/null +++ b/.config/nvim/after/available/vim-test.rc.vim @@ -0,0 +1,7 @@ +"nmap tn :TestNearest +"nmap tf :TestFile +"nmap ts :TestSuite +"nmap tl :TestLast +"nmap tv :TestVisit +" +"let test#strategy = "floaterm" diff --git a/.config/nvim/after/available/virt-column.rc.vim b/.config/nvim/after/available/virt-column.rc.vim new file mode 100644 index 0000000..e69de29 diff --git a/.config/nvim/after/available/which.rc.lua b/.config/nvim/after/available/which.rc.lua new file mode 100644 index 0000000..a5317b2 --- /dev/null +++ b/.config/nvim/after/available/which.rc.lua @@ -0,0 +1,5 @@ +require("which-key").setup { + -- your configuration comes here + -- or leave it empty to use the default settings + -- refer to the configuration section below +} diff --git a/.config/nvim/after/available/window.rc.lua b/.config/nvim/after/available/window.rc.lua new file mode 100644 index 0000000..1ceab05 --- /dev/null +++ b/.config/nvim/after/available/window.rc.lua @@ -0,0 +1,8 @@ +require('nvim-window').setup({ + chars = { + 'j', 'k', 'l', 'f', 'd', 's', 'g', 'h', 'i', 'e', 'a', 'b', 'm', 'n', 'o', + 'p', 'q', 'r', 'c', 't', 'u', 'v', 'w', 'x', 'y', 'z' + }, +}) + +vim.api.nvim_set_keymap('n', 'j', 'lua require("nvim-window").pick()', {silent=true, noremap = true}) diff --git a/.config/nvim/after/available/windows.rc.lua b/.config/nvim/after/available/windows.rc.lua new file mode 100644 index 0000000..a9b0fd4 --- /dev/null +++ b/.config/nvim/after/available/windows.rc.lua @@ -0,0 +1,8 @@ +vim.o.winwidth = 10 +vim.o.winminwidth = 10 +require("windows").setup() + +vim.keymap.set('n', 'z', " WindowsMaximize") +vim.keymap.set('n', '_', " WindowsMaximizeVertically") +vim.keymap.set('n', '|', " WindowsMaximizeHorizontally") +vim.keymap.set('n', '=', "") diff --git a/.config/nvim/after/plugin/airline.rc.vim b/.config/nvim/after/plugin/airline.rc.vim deleted file mode 100644 index 8342465..0000000 --- a/.config/nvim/after/plugin/airline.rc.vim +++ /dev/null @@ -1,5 +0,0 @@ -let g:airline_theme = 'minimalist' -let g:airline_powerline_fonts = 1 -let g:airline_stl_path_style = 'short' -let g:airline_highlighting_cache = 1 -let g:airline#extensions#searchcount#enabled = 0 diff --git a/.config/nvim/after/plugin/boole.rc.lua b/.config/nvim/after/plugin/boole.rc.lua new file mode 120000 index 0000000..a4b6f24 --- /dev/null +++ b/.config/nvim/after/plugin/boole.rc.lua @@ -0,0 +1 @@ +../available/boole.rc.lua \ No newline at end of file diff --git a/.config/nvim/after/plugin/comment.rc.lua b/.config/nvim/after/plugin/comment.rc.lua deleted file mode 100644 index a844323..0000000 --- a/.config/nvim/after/plugin/comment.rc.lua +++ /dev/null @@ -1 +0,0 @@ -require('Comment').setup() diff --git a/.config/nvim/after/plugin/comment.rc.lua b/.config/nvim/after/plugin/comment.rc.lua new file mode 120000 index 0000000..08afaf6 --- /dev/null +++ b/.config/nvim/after/plugin/comment.rc.lua @@ -0,0 +1 @@ +../available/comment.rc.lua \ No newline at end of file diff --git a/.config/nvim/after/plugin/context.rc.lua b/.config/nvim/after/plugin/context.rc.lua deleted file mode 100644 index e63bbca..0000000 --- a/.config/nvim/after/plugin/context.rc.lua +++ /dev/null @@ -1,35 +0,0 @@ --- " Configuration for context.vim --- "" Disable context.vim on json files --- ""let g:context_filetype_blacklist = ["json", "log"] -require'treesitter-context'.setup{ - enable = true, -- Enable this plugin (Can be enabled/disabled later via commands) - throttle = true, -- Throttles plugin updates (may improve performance) - max_lines = 0, -- How many lines the window should span. Values <= 0 mean no limit. - patterns = { -- Match patterns for TS nodes. These get wrapped to match at word boundaries. - -- For all filetypes - -- Note that setting an entry here replaces all other patterns for this entry. - -- By setting the 'default' entry below, you can control which nodes you want to - -- appear in the context window. - default = { - 'class', - 'function', - 'method', - 'for', - 'while', - 'if', - 'switch', - -- 'case', - }, - -- Example for a specific filetype. - -- If a pattern is missing, *open a PR* so everyone can benefit. - rust = { - 'impl_item', - }, - }, - exact_patterns = { - -- Example for a specific filetype with Lua patterns - -- Treat patterns.rust as a Lua pattern (i.e "^impl_item$" will - -- exactly match "impl_item" only) - rust = true, - } -} diff --git a/.config/nvim/after/plugin/context.rc.lua b/.config/nvim/after/plugin/context.rc.lua new file mode 120000 index 0000000..64966c4 --- /dev/null +++ b/.config/nvim/after/plugin/context.rc.lua @@ -0,0 +1 @@ +../available/context.rc.lua \ No newline at end of file diff --git a/.config/nvim/after/plugin/crates.rc.lua b/.config/nvim/after/plugin/crates.rc.lua deleted file mode 100644 index 1f9edce..0000000 --- a/.config/nvim/after/plugin/crates.rc.lua +++ /dev/null @@ -1 +0,0 @@ -require('crates').setup() diff --git a/.config/nvim/after/plugin/crates.rc.lua b/.config/nvim/after/plugin/crates.rc.lua new file mode 120000 index 0000000..936a39f --- /dev/null +++ b/.config/nvim/after/plugin/crates.rc.lua @@ -0,0 +1 @@ +../available/crates.rc.lua \ No newline at end of file diff --git a/.config/nvim/after/plugin/debugprint.rc.lua b/.config/nvim/after/plugin/debugprint.rc.lua new file mode 120000 index 0000000..33a2157 --- /dev/null +++ b/.config/nvim/after/plugin/debugprint.rc.lua @@ -0,0 +1 @@ +../available/debugprint.rc.lua \ No newline at end of file diff --git a/.config/nvim/after/plugin/digraphs.rc.vim b/.config/nvim/after/plugin/digraphs.rc.vim deleted file mode 100644 index 79423fa..0000000 --- a/.config/nvim/after/plugin/digraphs.rc.vim +++ /dev/null @@ -1 +0,0 @@ -inoremap lua require'betterdigraphs'.digraphs("i") diff --git a/.config/nvim/after/plugin/digraphs.rc.vim b/.config/nvim/after/plugin/digraphs.rc.vim new file mode 120000 index 0000000..cc14231 --- /dev/null +++ b/.config/nvim/after/plugin/digraphs.rc.vim @@ -0,0 +1 @@ +../available/digraphs.rc.vim \ No newline at end of file diff --git a/.config/nvim/after/plugin/dressing.rc.lua b/.config/nvim/after/plugin/dressing.rc.lua deleted file mode 100644 index ad5c5b5..0000000 --- a/.config/nvim/after/plugin/dressing.rc.lua +++ /dev/null @@ -1,116 +0,0 @@ -require('dressing').setup({ - input = { - -- Set to false to disable the vim.ui.input implementation - enabled = true, - - -- Default prompt string - default_prompt = "➤ ", - - -- When true, will close the modal - insert_only = true, - - -- These are passed to nvim_open_win - anchor = "SW", - border = "rounded", - -- 'editor' and 'win' will default to being centered - relative = "cursor", - - -- These can be integers or a float between 0 and 1 (e.g. 0.4 for 40%) - prefer_width = 40, - width = nil, - -- min_width and max_width can be a list of mixed types. - -- min_width = {20, 0.2} means "the greater of 20 columns or 20% of total" - max_width = { 140, 0.9 }, - min_width = { 20, 0.2 }, - - -- Window transparency (0-100) - winblend = 10, - -- Change default highlight groups (see :help winhl) - winhighlight = "", - - override = function(conf) - -- This is the config that will be passed to nvim_open_win. - -- Change values here to customize the layout - return conf - end, - - -- see :help dressing_get_config - get_config = nil, - }, - select = { - -- Set to false to disable the vim.ui.select implementation - enabled = true, - - -- Priority list of preferred vim.select implementations - backend = { "telescope", "fzf_lua", "fzf", "builtin", "nui" }, - - -- Options for telescope selector - -- These are passed into the telescope picker directly. Can be used like: - -- telescope = require('telescope.themes').get_ivy({...}) - -- telescope = require('telescope.themes').get_dropdown({}), - - -- Options for fzf selector - fzf = { - window = { - width = 0.5, - height = 0.4, - }, - }, - - -- Options for fzf_lua selector - fzf_lua = { - winopts = { - width = 0.5, - height = 0.4, - }, - }, - - -- Options for nui Menu - nui = { - position = "50%", - size = nil, - relative = "editor", - border = { - style = "rounded", - }, - max_width = 80, - max_height = 40, - }, - - -- Options for built-in selector - builtin = { - -- These are passed to nvim_open_win - anchor = "NW", - border = "rounded", - -- 'editor' and 'win' will default to being centered - relative = "editor", - - -- Window transparency (0-100) - winblend = 10, - -- Change default highlight groups (see :help winhl) - winhighlight = "", - - -- These can be integers or a float between 0 and 1 (e.g. 0.4 for 40%) - -- the min_ and max_ options can be a list of mixed types. - -- max_width = {140, 0.8} means "the lesser of 140 columns or 80% of total" - width = nil, - max_width = { 140, 0.8 }, - min_width = { 40, 0.2 }, - height = nil, - max_height = 0.9, - min_height = { 10, 0.2 }, - - override = function(conf) - -- This is the config that will be passed to nvim_open_win. - -- Change values here to customize the layout - return conf - end, - }, - - -- Used to override format_item. See :help dressing-format - format_item_override = {}, - - -- see :help dressing_get_config - get_config = nil, - }, -}) diff --git a/.config/nvim/after/plugin/dressing.rc.lua b/.config/nvim/after/plugin/dressing.rc.lua new file mode 120000 index 0000000..4e7cbce --- /dev/null +++ b/.config/nvim/after/plugin/dressing.rc.lua @@ -0,0 +1 @@ +../available/dressing.rc.lua \ No newline at end of file diff --git a/.config/nvim/after/plugin/femaco.rc.lua b/.config/nvim/after/plugin/femaco.rc.lua new file mode 120000 index 0000000..7df52d5 --- /dev/null +++ b/.config/nvim/after/plugin/femaco.rc.lua @@ -0,0 +1 @@ +../available/femaco.rc.lua \ No newline at end of file diff --git a/.config/nvim/after/plugin/fterm.rc.lua b/.config/nvim/after/plugin/fterm.rc.lua deleted file mode 100644 index 3407245..0000000 --- a/.config/nvim/after/plugin/fterm.rc.lua +++ /dev/null @@ -1,45 +0,0 @@ -require'FTerm'.setup({ - -- Filetype of the terminal buffer - ft = 'FTerm', - - -- Command to run inside the terminal. It could be a `string` or `table` - cmd = os.getenv('SHELL'), - - -- Neovim's native window border. See `:h nvim_open_win` for more configuration options. - border = 'double', - - -- Close the terminal as soon as shell/command exits. - -- Disabling this will mimic the native terminal behaviour. - auto_close = true, - - -- Highlight group for the terminal. See `:h winhl` - hl = 'Normal', - - -- Transparency of the floating window. See `:h winblend` - blend = 0, - - -- Object containing the terminal window dimensions. - -- The value for each field should be between `0` and `1` - dimensions = { - height = 0.8, -- Height of the terminal window - width = 0.8, -- Width of the terminal window - x = 0.5, -- X axis of the terminal window - y = 0.5, -- Y axis of the terminal window - }, - - -- Callback invoked when the terminal exits. - -- See `:h jobstart-options` - on_exit = nil, - - -- Callback invoked when the terminal emits stdout data. - -- See `:h jobstart-options` - on_stdout = nil, - - -- Callback invoked when the terminal emits stderr data. - -- See `:h jobstart-options` - on_stderr = nil, -}) - --- Example keybindings -vim.keymap.set('n', 'i', 'lua require("FTerm").toggle()') -vim.keymap.set('t', 'i', 'lua require("FTerm").toggle()') diff --git a/.config/nvim/after/plugin/fterm.rc.lua b/.config/nvim/after/plugin/fterm.rc.lua new file mode 120000 index 0000000..5cb9064 --- /dev/null +++ b/.config/nvim/after/plugin/fterm.rc.lua @@ -0,0 +1 @@ +../available/fterm.rc.lua \ No newline at end of file diff --git a/.config/nvim/after/plugin/gitsigns.rc.lua b/.config/nvim/after/plugin/gitsigns.rc.lua deleted file mode 100644 index ba4da77..0000000 --- a/.config/nvim/after/plugin/gitsigns.rc.lua +++ /dev/null @@ -1,104 +0,0 @@ -require('gitsigns').setup { - signs = { - 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` - linehl = false, -- Toggle with `:Gitsigns toggle_linehl` - word_diff = false, -- Toggle with `:Gitsigns toggle_word_diff` - --keymaps = { - -- -- Default keymap options - -- noremap = true, - - -- ['n ]c'] = { expr = true, "&diff ? ']c' : 'Gitsigns next_hunk'"}, - -- ['n [c'] = { expr = true, "&diff ? '[c' : 'Gitsigns prev_hunk'"}, - - -- ['n hs'] = 'Gitsigns stage_hunk', - -- ['v hs'] = 'Gitsigns stage_hunk', - -- ['n hu'] = 'Gitsigns undo_stage_hunk', - -- ['n hr'] = 'Gitsigns reset_hunk', - -- ['v hr'] = ':Gitsigns reset_hunk', - -- ['n hR'] = 'Gitsigns reset_buffer', - -- ['n hp'] = 'Gitsigns preview_hunk', - -- ['n hb'] = 'lua require"gitsigns".blame_line{full=true}', - -- ['n hS'] = 'Gitsigns stage_buffer', - -- ['n hU'] = 'Gitsigns reset_buffer_index', - - -- -- Text objects - -- ['o ih'] = 'Gitsigns select_hunk', - -- ['x ih'] = 'Gitsigns select_hunk' - --}, - on_attach = function(bufnr) - local gs = package.loaded.gitsigns - - local function map(mode, l, r, opts) - opts = opts or {} - opts.buffer = bufnr - vim.keymap.set(mode, l, r, opts) - end - - -- Navigation - map('n', ']c', function() - if vim.wo.diff then return ']c' end - vim.schedule(function() gs.next_hunk() end) - return '' - end, {expr=true}) - - map('n', '[c', function() - if vim.wo.diff then return '[c' end - vim.schedule(function() gs.prev_hunk() end) - return '' - end, {expr=true}) - - -- Actions - map({'n', 'v'}, 'hs', 'Gitsigns stage_hunk') - map({'n', 'v'}, 'hr', 'Gitsigns reset_hunk') - map('n', 'hS', gs.stage_buffer) - map('n', 'hu', gs.undo_stage_hunk) - map('n', 'hR', gs.reset_buffer) - map('n', 'hp', gs.preview_hunk) - map('n', 'hb', function() gs.blame_line{full=true} end) - map('n', 'tb', gs.toggle_current_line_blame) - map('n', 'hd', gs.diffthis) - map('n', 'hD', function() gs.diffthis('~') end) - map('n', 'td', gs.toggle_deleted) - - -- Text object - map({'o', 'x'}, 'ih', ':Gitsigns select_hunk') - end, - - watch_gitdir = { - interval = 1000, - follow_files = true - }, - attach_to_untracked = true, - current_line_blame = true, -- Toggle with `:Gitsigns toggle_current_line_blame` - current_line_blame_opts = { - virt_text = true, - virt_text_pos = 'eol', -- 'eol' | 'overlay' | 'right_align' - delay = 1000, - ignore_whitespace = true, - }, - current_line_blame_formatter_opts = { - relative_time = false - }, - sign_priority = 6, - update_debounce = 100, - status_formatter = nil, -- Use default - max_file_length = 40000, - preview_config = { - -- Options passed to nvim_open_win - border = 'single', - style = 'minimal', - relative = 'cursor', - row = 0, - col = 1 - }, - yadm = { - enable = true - }, -} diff --git a/.config/nvim/after/plugin/gitsigns.rc.lua b/.config/nvim/after/plugin/gitsigns.rc.lua new file mode 120000 index 0000000..ae499e6 --- /dev/null +++ b/.config/nvim/after/plugin/gitsigns.rc.lua @@ -0,0 +1 @@ +../available/gitsigns.rc.lua \ No newline at end of file diff --git a/.config/nvim/after/plugin/hlslens.rc.vim b/.config/nvim/after/plugin/hlslens.rc.vim deleted file mode 100644 index f9c5b95..0000000 --- a/.config/nvim/after/plugin/hlslens.rc.vim +++ /dev/null @@ -1,11 +0,0 @@ -"noremap n execute('normal! ' . v:count1 . 'n') -" \lua require('hlslens').start() -"noremap N execute('normal! ' . v:count1 . 'N') -" \lua require('hlslens').start() -"noremap * *lua require('hlslens').start() -"noremap # #lua require('hlslens').start() -"noremap g* g*lua require('hlslens').start() -"noremap g# g#lua require('hlslens').start() -" -"" use : instead of -"nnoremap l :noh diff --git a/.config/nvim/after/plugin/hlslens.rc.vim b/.config/nvim/after/plugin/hlslens.rc.vim new file mode 120000 index 0000000..b3ef854 --- /dev/null +++ b/.config/nvim/after/plugin/hlslens.rc.vim @@ -0,0 +1 @@ +../available/hlslens.rc.vim \ No newline at end of file diff --git a/.config/nvim/after/plugin/icons.rc.lua b/.config/nvim/after/plugin/icons.rc.lua deleted file mode 100644 index 0aa3628..0000000 --- a/.config/nvim/after/plugin/icons.rc.lua +++ /dev/null @@ -1,5 +0,0 @@ --- require("icon-picker") --- --- local opts = { noremap = true, silent = true } --- --- vim.keymap.set("n", "o", "PickIcons", opts) diff --git a/.config/nvim/after/plugin/icons.rc.lua b/.config/nvim/after/plugin/icons.rc.lua new file mode 120000 index 0000000..8f62cfd --- /dev/null +++ b/.config/nvim/after/plugin/icons.rc.lua @@ -0,0 +1 @@ +../available/icons.rc.lua \ No newline at end of file diff --git a/.config/nvim/after/plugin/illuminate.rc.lua b/.config/nvim/after/plugin/illuminate.rc.lua new file mode 120000 index 0000000..09bb709 --- /dev/null +++ b/.config/nvim/after/plugin/illuminate.rc.lua @@ -0,0 +1 @@ +../available/illuminate.rc.lua \ No newline at end of file diff --git a/.config/nvim/after/plugin/indent.rc.lua b/.config/nvim/after/plugin/indent.rc.lua deleted file mode 100644 index 3ed3e19..0000000 --- a/.config/nvim/after/plugin/indent.rc.lua +++ /dev/null @@ -1,22 +0,0 @@ ---require("indent_blankline").setup { --- char = "", --- show_current_context = true, --- --show_current_context_start = true, --- space_char_blankline = " ", --- char_highlight_list = { --- "IndentBlanklineIndent1", --- "IndentBlanklineIndent2", --- "IndentBlanklineIndent3", --- "IndentBlanklineIndent4", --- "IndentBlanklineIndent5", --- "IndentBlanklineIndent6", --- }, --- space_char_highlight_list = { --- "IndentBlanklineIndent1", --- "IndentBlanklineIndent2", --- "IndentBlanklineIndent3", --- "IndentBlanklineIndent4", --- "IndentBlanklineIndent5", --- "IndentBlanklineIndent6", --- }, ---} diff --git a/.config/nvim/after/plugin/indent.rc.lua b/.config/nvim/after/plugin/indent.rc.lua new file mode 120000 index 0000000..0ae8a68 --- /dev/null +++ b/.config/nvim/after/plugin/indent.rc.lua @@ -0,0 +1 @@ +../available/indent.rc.lua \ No newline at end of file diff --git a/.config/nvim/after/plugin/iswap.rc.lua b/.config/nvim/after/plugin/iswap.rc.lua deleted file mode 100644 index badcc1c..0000000 --- a/.config/nvim/after/plugin/iswap.rc.lua +++ /dev/null @@ -1,5 +0,0 @@ -require('iswap').setup{} - -local opts = { noremap=true, silent=true } -vim.api.nvim_set_keymap('n', 'ta', 'ISwapWith', opts) -vim.api.nvim_set_keymap('n', 'tn', 'ISwap', opts) diff --git a/.config/nvim/after/plugin/iswap.rc.lua b/.config/nvim/after/plugin/iswap.rc.lua new file mode 120000 index 0000000..80516ff --- /dev/null +++ b/.config/nvim/after/plugin/iswap.rc.lua @@ -0,0 +1 @@ +../available/iswap.rc.lua \ No newline at end of file diff --git a/.config/nvim/after/plugin/knap.rc.lua b/.config/nvim/after/plugin/knap.rc.lua deleted file mode 100644 index befd71c..0000000 --- a/.config/nvim/after/plugin/knap.rc.lua +++ /dev/null @@ -1,29 +0,0 @@ -local gknapsettings = { - htmloutputext = "html", - htmltohtml = "touch %outputfile%", - htmltohtmlviewerlaunch = "google-chrome-beta %outputfile%", - htmltohtmlviewerrefresh = "none", - mdoutputext = "html", - mdtohtml = "pandoc --standalone %docroot% -o %outputfile%", - mdtohtmlviewerlaunch = "google-chrome-beta %outputfile%", - mdtohtmlviewerrefresh = "none", - mdtopdf = "pandoc %docroot% -o %outputfile%", - mdtopdfviewerlaunch = "sioyek %outputfile%", - mdtopdfviewerrefresh = "none", - markdownoutputext = "html", - markdowntohtml = "pandoc --standalone %docroot% -o %outputfile%", - markdowntohtmlviewerlaunch = "google-chrome-beta %outputfile%", - markdowntohtmlviewerrefresh = "none", - markdowntopdf = "pandoc %docroot% -o %outputfile%", - markdowntopdfviewerlaunch = "sioyek %outputfile%", - markdowntopdfviewerrefresh = "none", - texoutputext = "pdf", - textopdf = "pdflatex -interaction=batchmode -halt-on-error -synctex=1 %docroot%", - textopdfviewerlaunch = "sioyek --inverse-search 'nvim --headless -es --cmd \"lua require('\"'\"'knaphelper'\"'\"').relayjump('\"'\"'%servername%'\"'\"','\"'\"'%1'\"'\"',%2,%3)\"' --reuse-instance %outputfile%", - textopdfviewerrefresh = "none", - textopdfforwardjump = "sioyek --inverse-search 'nvim --headless -es --cmd \"lua require('\"'\"'knaphelper'\"'\"').relayjump('\"'\"'%servername%'\"'\"','\"'\"'%1'\"'\"',%2,%3)\"' --reuse-instance --forward-search-file %srcfile% --forward-search-line %line% %outputfile%", - textopdfshorterror = "A=%outputfile% ; LOGFILE=\"${A%.pdf}.log\" ; rubber-info \"$LOGFILE\" 2>&1 | head -n 1", - delay = 250 -} - -vim.g.knap_settings = gknapsettings diff --git a/.config/nvim/after/plugin/knap.rc.lua b/.config/nvim/after/plugin/knap.rc.lua new file mode 120000 index 0000000..8898650 --- /dev/null +++ b/.config/nvim/after/plugin/knap.rc.lua @@ -0,0 +1 @@ +../available/knap.rc.lua \ No newline at end of file diff --git a/.config/nvim/after/plugin/lspconfig.rc.lua b/.config/nvim/after/plugin/lspconfig.rc.lua deleted file mode 100644 index 08f14a2..0000000 --- a/.config/nvim/after/plugin/lspconfig.rc.lua +++ /dev/null @@ -1,160 +0,0 @@ -local nvim_lsp = require'lspconfig' -local coq = require'coq' ---local cmp = require'cmp_nvim_lsp' -local clangd_extensions = require("clangd_extensions") - --- Mappings. -local opts = { noremap=true, silent=true } -vim.api.nvim_set_keymap('n', 'e', 'lua vim.diagnostic.open_float()', opts) -vim.api.nvim_set_keymap('n', '[d', 'lua vim.diagnostic.goto_prev()', opts) -vim.api.nvim_set_keymap('n', ']d', 'lua vim.diagnostic.goto_next()', opts) -vim.api.nvim_set_keymap('n', 'E', 'lua vim.diagnostic.set_loclist()', opts) -vim.api.nvim_set_keymap("n", "q", "lua vim.lsp.buf.format{ async = true }", opts) - --- Use an on_attach function to only map the following keys --- after the language server attaches to the current buffer -local on_attach = function(client, bufnr) - --Enable completion triggered by - vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc') - - ---- See `:help vim.lsp.*` for documentation on any of the below functions - vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gD', 'lua vim.lsp.buf.declaration()', opts) - vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gd', 'lua vim.lsp.buf.definition()', opts) - vim.api.nvim_buf_set_keymap(bufnr, 'n', 'K', 'lua vim.lsp.buf.hover()', opts) - vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gi', 'lua vim.lsp.buf.implementation()', opts) - vim.api.nvim_buf_set_keymap(bufnr, 'n', '', 'lua vim.lsp.buf.signature_help()', opts) - --vim.api.nvim_buf_set_keymap(bufnr, 'n', 'wa', 'lua vim.lsp.buf.add_workspace_folder()', opts) - --vim.api.nvim_buf_set_keymap(bufnr, 'n', 'wr', 'lua vim.lsp.buf.remove_workspace_folder()', opts) - --vim.api.nvim_buf_set_keymap(bufnr, 'n', 'wl', 'lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))', opts) - vim.api.nvim_buf_set_keymap(bufnr, 'n', 'D', 'lua vim.lsp.buf.type_definition()', opts) - vim.api.nvim_buf_set_keymap(bufnr, 'n', 'rn', 'lua vim.lsp.buf.rename()', opts) - vim.api.nvim_buf_set_keymap(bufnr, 'n', 'ca', 'lua vim.lsp.buf.code_action()', opts) - vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gr', 'lua vim.lsp.buf.references()', opts) - vim.api.nvim_buf_set_keymap(bufnr, 'n', '', 'ClangdSwitchSourceHeader', opts) - - require'illuminate'.on_attach(client) - require'virtualtypes'.on_attach() - require'lsp_signature'.on_attach({ - floating_window = true, - floating_window_above_cur_line = false, - floating_window_off_x = 500, - floating_window_off_y = -5, - }) -end - -local signs = { - { name = "DiagnosticSignError", text = "" }, - { name = "DiagnosticSignWarn", text = "" }, - { name = "DiagnosticSignHint", text = "" }, - { name = "DiagnosticSignInfo", text = "" }, - } - - for _, sign in ipairs(signs) do - vim.fn.sign_define(sign.name, { texthl = sign.name, text = sign.text, numhl = "" }) - end - -vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with( - vim.lsp.diagnostic.on_publish_diagnostics, { - signs = { - active = signs, - --severity_limit = 'info', - }, - severity_sort = true, - underline = false, - update_in_insert = false, - --virtual_text = { - -- spacing = 40, - -- severity_limit = 'Warning', - --}, - virtual_text = false, - } -) - -nvim_lsp.groovyls.setup (coq.lsp_ensure_capabilities({ - cmd = { "java", "-jar", "/home/kmcr/tools/groovy-language-server/build/libs/groovy-language-server-all.jar" }, - on_attach = on_attach, - on_publish_diagnostics = diagnostic_handler, - capabilities = vim.lsp.protocol.make_client_capabilities(), - }) -) - --- nvim_lsp.ccls.setup( --- coq.lsp_ensure_capabilities({ --- init_options = { --- compilationDatabaseDirectory = "."; --- index = { --- threads = 0; --- }, --- clang = { --- excludeArgs = { "-frounding-math"} ; --- }, --- }, --- root_dir = nvim_lsp.util.root_pattern("compile_commands.json"), --- on_attach = on_attach, --- on_publish_diagnostics = diagnostic_handler, --- capabilities = cmp.update_capabilities(vim.lsp.protocol.make_client_capabilities()), --- flags = { --- debounce_text_changes = 150, --- }} --- ) --- ) - -clangd_extensions.setup(coq.lsp_ensure_capabilities({ - server = { - on_attach = on_attach, - root_pattern = { - '.clangd', - '.clang-tidy', - '.clang-format', - 'compile_commands.json', - 'compile_flags.txt', - 'configure.ac', - } - }, - inlay_hints = { - max_len_align = true, - max_len_align_padding = 3, - right_align = true, - } -})) --- nvim_lsp.clangd.setup( --- coq.lsp_ensure_capabilities({ --- root_dir = nvim_lsp.util.root_pattern("compile_commands.json"), --- on_attach = on_attach, --- capabilities = cmp.update_capabilities(vim.lsp.protocol.make_client_capabilities()), --- flags = { --- debounce_text_changes = 150, --- }} --- ) --- ) - -nvim_lsp.pylsp.setup(coq.lsp_ensure_capabilities({ - settings = { - pylint = { - enabled = false - }, - pyflakes = { - enabled = false, - }, - }, - flags = { - debounce_text_changes = 150, - }, - on_attach = on_attach, - on_publish_diagnostics = diagnostic_handler, - capabilities = vim.lsp.protocol.make_client_capabilities(), -})) - --- Use a loop to conveniently call 'setup' on multiple servers and --- map buffer local keybindings when the language server attaches -local servers = { "cmake", "rust_analyzer", "bashls" } -for _, lsp in ipairs(servers) do - nvim_lsp[lsp].setup(coq.lsp_ensure_capabilities({ - on_attach = on_attach, - on_publish_diagnostics = diagnostic_handler, - capabilities = vim.lsp.protocol.make_client_capabilities(), - flags = { - debounce_text_changes = 150, - } - })) -end diff --git a/.config/nvim/after/plugin/lspconfig.rc.lua b/.config/nvim/after/plugin/lspconfig.rc.lua new file mode 120000 index 0000000..1ab1297 --- /dev/null +++ b/.config/nvim/after/plugin/lspconfig.rc.lua @@ -0,0 +1 @@ +../available/lspconfig.rc.lua \ No newline at end of file diff --git a/.config/nvim/after/plugin/lualine.rc.lua b/.config/nvim/after/plugin/lualine.rc.lua new file mode 120000 index 0000000..03d1fe9 --- /dev/null +++ b/.config/nvim/after/plugin/lualine.rc.lua @@ -0,0 +1 @@ +../available/lualine.rc.lua \ No newline at end of file diff --git a/.config/nvim/after/plugin/md-preview.rc.vim b/.config/nvim/after/plugin/md-preview.rc.vim deleted file mode 100644 index 3e866c8..0000000 --- a/.config/nvim/after/plugin/md-preview.rc.vim +++ /dev/null @@ -1 +0,0 @@ -let g:mkdp_filetypes = ['markdown', 'plantuml'] diff --git a/.config/nvim/after/plugin/md-preview.rc.vim b/.config/nvim/after/plugin/md-preview.rc.vim new file mode 120000 index 0000000..3a11464 --- /dev/null +++ b/.config/nvim/after/plugin/md-preview.rc.vim @@ -0,0 +1 @@ +../available/md-preview.rc.vim \ No newline at end of file diff --git a/.config/nvim/after/plugin/minimap.rc.lua b/.config/nvim/after/plugin/minimap.rc.lua new file mode 120000 index 0000000..41cb308 --- /dev/null +++ b/.config/nvim/after/plugin/minimap.rc.lua @@ -0,0 +1 @@ +../available/minimap.rc.lua \ No newline at end of file diff --git a/.config/nvim/after/plugin/mkdnflow.rc.lua b/.config/nvim/after/plugin/mkdnflow.rc.lua new file mode 120000 index 0000000..8a0f6df --- /dev/null +++ b/.config/nvim/after/plugin/mkdnflow.rc.lua @@ -0,0 +1 @@ +../available/mkdnflow.rc.lua \ No newline at end of file diff --git a/.config/nvim/after/plugin/neogen.rc.lua b/.config/nvim/after/plugin/neogen.rc.lua deleted file mode 100644 index 1bed6e1..0000000 --- a/.config/nvim/after/plugin/neogen.rc.lua +++ /dev/null @@ -1,22 +0,0 @@ -require("neogen").setup({ - --snippet_engine = 'ultisnips', - input_after_comment = true, -}) - --- { --- { nil, "///!", { no_results = true, type = { "func", "file", "class" } } }, --- { nil, "///! @file", { no_results = true, type = { "file" } } }, --- { nil, "///! * @brief $1", { no_results = true, type = { "func", "file", "class" } } }, --- { nil, "", { no_results = true, type = { "func", "file", "class" } } }, --- { nil, "", { no_results = true, type = { "file" } } }, --- --- { nil, "/**", { type = { "func", "class", "type" } } }, --- { i.ClassName, " * @class %s", { type = { "class" } } }, --- { i.Type, " * @typedef %s", { type = { "type" } } }, --- { nil, " * @brief $1", { type = { "func", "class", "type" } } }, --- { nil, " *", { type = { "func", "class", "type" } } }, --- { i.Tparam, " * @tparam %s $1" }, --- { i.Parameter, " * @param %s $1" }, --- { i.Return, " * @return $1" }, --- { nil, " */", { type = { "func", "class", "type" } } }, --- } diff --git a/.config/nvim/after/plugin/neogen.rc.lua b/.config/nvim/after/plugin/neogen.rc.lua new file mode 120000 index 0000000..33d3263 --- /dev/null +++ b/.config/nvim/after/plugin/neogen.rc.lua @@ -0,0 +1 @@ +../available/neogen.rc.lua \ No newline at end of file diff --git a/.config/nvim/after/plugin/neorg.rc.lua b/.config/nvim/after/plugin/neorg.rc.lua deleted file mode 100644 index 34eb640..0000000 --- a/.config/nvim/after/plugin/neorg.rc.lua +++ /dev/null @@ -1,13 +0,0 @@ -require('neorg').setup { - load = { - ["core.defaults"] = {} - }, - ["core.norg.dirman"] = { - config = { - workspaces = { - work = "~/notes/work", - home = "~/notes/home", - } - } - } -} diff --git a/.config/nvim/after/plugin/neorg.rc.lua b/.config/nvim/after/plugin/neorg.rc.lua new file mode 120000 index 0000000..fe9e272 --- /dev/null +++ b/.config/nvim/after/plugin/neorg.rc.lua @@ -0,0 +1 @@ +../available/neorg.rc.lua \ No newline at end of file diff --git a/.config/nvim/after/plugin/neoscroll.rc.lua b/.config/nvim/after/plugin/neoscroll.rc.lua deleted file mode 100644 index 5b86db6..0000000 --- a/.config/nvim/after/plugin/neoscroll.rc.lua +++ /dev/null @@ -1,13 +0,0 @@ --- require('neoscroll').setup({ --- -- All these keys will be mapped to their corresponding default scrolling animation --- mappings = {'', '', '', '', --- '', '', 'zt', 'zz', 'zb'}, --- hide_cursor = true, -- Hide cursor while scrolling --- stop_eof = true, -- Stop at when scrolling downwards --- use_local_scrolloff = false, -- Use the local scope of scrolloff instead of the global scope --- respect_scrolloff = false, -- Stop scrolling when the cursor reaches the scrolloff margin of the file --- cursor_scrolls_alone = true, -- The cursor will keep on scrolling even if the window cannot scroll further --- easing_function = nil, -- Default easing function --- pre_hook = nil, -- Function to run before the scrolling animation starts --- post_hook = nil, -- Function to run after the scrolling animation ends --- }) diff --git a/.config/nvim/after/plugin/neoscroll.rc.lua b/.config/nvim/after/plugin/neoscroll.rc.lua new file mode 120000 index 0000000..10cd1de --- /dev/null +++ b/.config/nvim/after/plugin/neoscroll.rc.lua @@ -0,0 +1 @@ +../available/neoscroll.rc.lua \ No newline at end of file diff --git a/.config/nvim/after/plugin/nvim-cmp.rc.lua b/.config/nvim/after/plugin/nvim-cmp.rc.lua deleted file mode 100644 index 3d983f0..0000000 --- a/.config/nvim/after/plugin/nvim-cmp.rc.lua +++ /dev/null @@ -1,73 +0,0 @@ --- Setup nvim-cmp. ---local cmp = require'cmp' --- ---cmp.setup({ --- snippet = { --- expand = function(args) --- -- For `vsnip` user. --- -- vim.fn["vsnip#anonymous"](args.body) --- --- -- For `luasnip` user. --- -- require('luasnip').lsp_expand(args.body) --- --- -- For `ultisnips` user. --- vim.fn["UltiSnips#Anon"](args.body) --- end, --- }, --- mapping = cmp.mapping.preset.insert({ --- [''] = cmp.mapping(cmp.mapping.scroll_docs(-4), { 'i', 'c' }), --- [''] = cmp.mapping(cmp.mapping.scroll_docs(4), { 'i', 'c' }), --- [''] = cmp.mapping(cmp.mapping.complete(), { 'i', 'c' }), --- [''] = cmp.mapping.confirm({ select = true }), --- [''] = cmp.mapping({ --- i = cmp.mapping.abort(), --- c = cmp.mapping.close(), --- }), --- }), --- sources = cmp.config.sources({ --- { name = 'nvim_lsp' }, --- --- { name = 'path' }, --- --- { name = 'ultisnips' }, --- --- { name = 'calc' }, --- --- { name = 'cmp_matlab' }, --- --- { name = 'cmp_git' }, --- }, { --- { name = 'buffer', keyword_length = 5, max_item_count = 10, priority = -5 }, --- }), --- --experimental = { --- -- native_menu = false --- --} --- --- sorting = { --- comparators = { --- cmp.config.compare.offset, --- cmp.config.compare.exact, --- cmp.config.compare.recently_used, --- require("clangd_extensions.cmp_scores"), --- cmp.config.compare.kind, --- cmp.config.compare.sort_text, --- cmp.config.compare.length, --- cmp.config.compare.order, --- }, --- }, ---}) --- ---cmp.setup.cmdline('/', { --- sources = { --- { name = 'buffer' } --- } ---}) --- ---cmp.setup.cmdline(':', { --- sources = { --- { name = 'cmdline' } --- }, --- mapping = cmp.mapping.preset.cmdline() ---}) --- ---require("cmp_git").setup() diff --git a/.config/nvim/after/plugin/nvim-cmp.rc.lua b/.config/nvim/after/plugin/nvim-cmp.rc.lua new file mode 120000 index 0000000..03c097e --- /dev/null +++ b/.config/nvim/after/plugin/nvim-cmp.rc.lua @@ -0,0 +1 @@ +../available/nvim-cmp.rc.lua \ No newline at end of file diff --git a/.config/nvim/after/plugin/nvim-dap.rc.lua b/.config/nvim/after/plugin/nvim-dap.rc.lua deleted file mode 100644 index e69de29..0000000 diff --git a/.config/nvim/after/plugin/nvim-dap.rc.lua b/.config/nvim/after/plugin/nvim-dap.rc.lua new file mode 120000 index 0000000..31196fa --- /dev/null +++ b/.config/nvim/after/plugin/nvim-dap.rc.lua @@ -0,0 +1 @@ +../available/nvim-dap.rc.lua \ No newline at end of file diff --git a/.config/nvim/after/plugin/nvim-tree.rc.lua b/.config/nvim/after/plugin/nvim-tree.rc.lua new file mode 120000 index 0000000..877661d --- /dev/null +++ b/.config/nvim/after/plugin/nvim-tree.rc.lua @@ -0,0 +1 @@ +../available/nvim-tree.rc.lua \ No newline at end of file diff --git a/.config/nvim/after/plugin/peek.rc.lua b/.config/nvim/after/plugin/peek.rc.lua new file mode 120000 index 0000000..c8b99e2 --- /dev/null +++ b/.config/nvim/after/plugin/peek.rc.lua @@ -0,0 +1 @@ +../available/peek.rc.lua \ No newline at end of file diff --git a/.config/nvim/after/plugin/screenshot.rc.lua b/.config/nvim/after/plugin/screenshot.rc.lua new file mode 120000 index 0000000..63741e1 --- /dev/null +++ b/.config/nvim/after/plugin/screenshot.rc.lua @@ -0,0 +1 @@ +../available/screenshot.rc.lua \ No newline at end of file diff --git a/.config/nvim/after/plugin/search-pulse.rc.vim b/.config/nvim/after/plugin/search-pulse.rc.vim deleted file mode 100644 index 56fbd58..0000000 --- a/.config/nvim/after/plugin/search-pulse.rc.vim +++ /dev/null @@ -1,2 +0,0 @@ -let g:vim_search_pulse_mode = 'pattern' -let g:vim_search_pulse_duration = 400 diff --git a/.config/nvim/after/plugin/search-pulse.rc.vim b/.config/nvim/after/plugin/search-pulse.rc.vim new file mode 120000 index 0000000..1ef9d71 --- /dev/null +++ b/.config/nvim/after/plugin/search-pulse.rc.vim @@ -0,0 +1 @@ +../available/search-pulse.rc.vim \ No newline at end of file diff --git a/.config/nvim/after/plugin/startify.rc.vim b/.config/nvim/after/plugin/startify.rc.vim deleted file mode 100644 index 9a67c9e..0000000 --- a/.config/nvim/after/plugin/startify.rc.vim +++ /dev/null @@ -1 +0,0 @@ -let g:startify_custom_header = '' diff --git a/.config/nvim/after/plugin/startify.rc.vim b/.config/nvim/after/plugin/startify.rc.vim new file mode 120000 index 0000000..491cde7 --- /dev/null +++ b/.config/nvim/after/plugin/startify.rc.vim @@ -0,0 +1 @@ +../available/startify.rc.vim \ No newline at end of file diff --git a/.config/nvim/after/plugin/telescope.rc.vim b/.config/nvim/after/plugin/telescope.rc.vim deleted file mode 100644 index b030aca..0000000 --- a/.config/nvim/after/plugin/telescope.rc.vim +++ /dev/null @@ -1,34 +0,0 @@ -" Find files using Telescope command-line sugar. -"nnoremap f Telescope find_files -"nnoremap g Telescope live_grep -"nnoremap b Telescope buffers -"nnoremap fh Telescope help_tags - -lua << EOF - -require('telescope').load_extension('ultisnips') - -EOF - -" Using Lua functions -nnoremap f lua require('telescope.builtin').find_files() -nnoremap a lua require('telescope.builtin').grep_string() -nnoremap A lua require('telescope.builtin').live_grep() -nnoremap b lua require('telescope.builtin').buffers() -nnoremap r lua require('telescope.builtin').resume() -"nnoremap fh lua require('telescope.builtin').help_tags() -nnoremap tc lua require('telescope.builtin').commands() -nnoremap t: lua require('telescope.builtin').command_history() -nnoremap t/ lua require('telescope.builtin').search_history() -nnoremap tr lua require('telescope.builtin').registers() - -" Neovim lsp pickers -nnoremap tr lua require('telescope.builtin').lsp_references() -nnoremap td lua require('telescope.builtin').lsp_definitions() - -" git pickers -nnoremap gc lua require('telescope.builtin').git_commits() -nnoremap gC lua require('telescope.builtin').git_bcommits() -nnoremap gb lua require('telescope.builtin').git_branches() - -nnoremap s lua require('telescope').extensions.ultisnips.ultisnips() diff --git a/.config/nvim/after/plugin/telescope.rc.vim b/.config/nvim/after/plugin/telescope.rc.vim new file mode 120000 index 0000000..8b964fb --- /dev/null +++ b/.config/nvim/after/plugin/telescope.rc.vim @@ -0,0 +1 @@ +../available/telescope.rc.vim \ No newline at end of file diff --git a/.config/nvim/after/plugin/themer.rc.lua b/.config/nvim/after/plugin/themer.rc.lua deleted file mode 100644 index 1abe3c3..0000000 --- a/.config/nvim/after/plugin/themer.rc.lua +++ /dev/null @@ -1,11 +0,0 @@ ---require("themer").setup({ --- colorscheme = "scery", --- enable_installer = true, --- styles = { --- ["function"] = { style = 'italic' }, --- functionbuiltin = { style = 'italic' }, --- variable = { style = 'italic' }, --- variableBuiltIn = { style = 'italic' }, --- parameter = { style = 'italic' }, --- }, ---}) diff --git a/.config/nvim/after/plugin/themer.rc.lua b/.config/nvim/after/plugin/themer.rc.lua new file mode 120000 index 0000000..2538f55 --- /dev/null +++ b/.config/nvim/after/plugin/themer.rc.lua @@ -0,0 +1 @@ +../available/themer.rc.lua \ No newline at end of file diff --git a/.config/nvim/after/plugin/treesitter.rc.lua b/.config/nvim/after/plugin/treesitter.rc.lua deleted file mode 100644 index b43f1d5..0000000 --- a/.config/nvim/after/plugin/treesitter.rc.lua +++ /dev/null @@ -1,58 +0,0 @@ --- Tree-sitter configuration - -ts = require'nvim-treesitter.configs' - -ts.setup { - highlight = { - enable = true, - additional_vim_regex_highlighting = false, - }, - ensure_installed = { - "bash", - "c", - "cmake", - "cpp", - "fish", - "lua", - "rust", - }, - -- disabled, since it mostly shifts to four characters - --indent = { - -- enable = true, - --}, - incremental_selection = { - enable = true, - keymaps = { - init_selection = "ti", - node_incremental = "ti", - scope_incremental = "ts", - node_decremental = "td", - }, - }, - rainbow = { - enable = true, - -- 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 - max_file_lines = 10000, -- Do not enable for files with more than n lines, int - -- colors = {}, -- table of hex strings - -- termcolors = {} -- table of colour name strings - }, - --textobjects = { - -- swap = { - -- enable = true, - -- swap_next = { - -- ["tan"] = "@parameter.inner", - -- }, - -- swap_previous = { - -- ["tap"] = "@parameter.inner", - -- }, - -- }, - --}, - matchup = { - enable = true, - -- disable = { "c", "ruby" }, - include_match_words - }, -} ---vim.opt.foldmethod = "expr" ---vim.opt.foldexpr = "nvim_treesitter#foldexpr()" diff --git a/.config/nvim/after/plugin/treesitter.rc.lua b/.config/nvim/after/plugin/treesitter.rc.lua new file mode 120000 index 0000000..10fc495 --- /dev/null +++ b/.config/nvim/after/plugin/treesitter.rc.lua @@ -0,0 +1 @@ +../available/treesitter.rc.lua \ No newline at end of file diff --git a/.config/nvim/after/plugin/ufo.rc.lua b/.config/nvim/after/plugin/ufo.rc.lua deleted file mode 100644 index 058f962..0000000 --- a/.config/nvim/after/plugin/ufo.rc.lua +++ /dev/null @@ -1,12 +0,0 @@ -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 -} - ---require('ufo').setup() diff --git a/.config/nvim/after/plugin/ufo.rc.lua b/.config/nvim/after/plugin/ufo.rc.lua new file mode 120000 index 0000000..d6001ed --- /dev/null +++ b/.config/nvim/after/plugin/ufo.rc.lua @@ -0,0 +1 @@ +../available/ufo.rc.lua \ No newline at end of file diff --git a/.config/nvim/after/plugin/ultisnips.rc.vim b/.config/nvim/after/plugin/ultisnips.rc.vim deleted file mode 100644 index 4c43e2d..0000000 --- a/.config/nvim/after/plugin/ultisnips.rc.vim +++ /dev/null @@ -1,8 +0,0 @@ -" Set completeopt to have a better completion experience -"set completeopt=menuone,noinsert,noselect -let g:completion_enable_snippet = 'UltiSnips' -"iunmap -"map =UltiSnips#ExpandSnippet() -"let g:UltiSnipsExpandTrigger="" -let g:UltiSnipsJumpForwardTrigger="" -let g:UltiSnipsJumpBackwardTrigger="" diff --git a/.config/nvim/after/plugin/ultisnips.rc.vim b/.config/nvim/after/plugin/ultisnips.rc.vim new file mode 120000 index 0000000..8cdd860 --- /dev/null +++ b/.config/nvim/after/plugin/ultisnips.rc.vim @@ -0,0 +1 @@ +../available/ultisnips.rc.vim \ No newline at end of file diff --git a/.config/nvim/after/plugin/vim-cmake.rc.vim b/.config/nvim/after/plugin/vim-cmake.rc.vim deleted file mode 100644 index 29e52d7..0000000 --- a/.config/nvim/after/plugin/vim-cmake.rc.vim +++ /dev/null @@ -1,13 +0,0 @@ -let g:cmake_build_options = [ "-j10" ] - -let g:cmake_root_markers = ['.svn'] - - -let g:cmake_jump_on_error = 0 " We do not want to focus the console -augroup vim-cmake-group -autocmd User CMakeBuildFailed :cfirst -augroup END - -augroup vim-cmake-group -autocmd! User CMakeBuildSucceeded CMakeClose -augroup END diff --git a/.config/nvim/after/plugin/vim-cmake.rc.vim b/.config/nvim/after/plugin/vim-cmake.rc.vim new file mode 120000 index 0000000..3709325 --- /dev/null +++ b/.config/nvim/after/plugin/vim-cmake.rc.vim @@ -0,0 +1 @@ +../available/vim-cmake.rc.vim \ No newline at end of file diff --git a/.config/nvim/after/plugin/vim-test.rc.vim b/.config/nvim/after/plugin/vim-test.rc.vim deleted file mode 100644 index 21f5c47..0000000 --- a/.config/nvim/after/plugin/vim-test.rc.vim +++ /dev/null @@ -1,7 +0,0 @@ -"nmap tn :TestNearest -"nmap tf :TestFile -"nmap ts :TestSuite -"nmap tl :TestLast -"nmap tv :TestVisit -" -"let test#strategy = "floaterm" diff --git a/.config/nvim/after/plugin/vim-test.rc.vim b/.config/nvim/after/plugin/vim-test.rc.vim new file mode 120000 index 0000000..bc83dac --- /dev/null +++ b/.config/nvim/after/plugin/vim-test.rc.vim @@ -0,0 +1 @@ +../available/vim-test.rc.vim \ No newline at end of file diff --git a/.config/nvim/after/plugin/virt-column.rc.vim b/.config/nvim/after/plugin/virt-column.rc.vim deleted file mode 100644 index e69de29..0000000 diff --git a/.config/nvim/after/plugin/virt-column.rc.vim b/.config/nvim/after/plugin/virt-column.rc.vim new file mode 120000 index 0000000..5cf2b9f --- /dev/null +++ b/.config/nvim/after/plugin/virt-column.rc.vim @@ -0,0 +1 @@ +../available/virt-column.rc.vim \ No newline at end of file diff --git a/.config/nvim/after/plugin/which.rc.lua b/.config/nvim/after/plugin/which.rc.lua deleted file mode 100644 index a5317b2..0000000 --- a/.config/nvim/after/plugin/which.rc.lua +++ /dev/null @@ -1,5 +0,0 @@ -require("which-key").setup { - -- your configuration comes here - -- or leave it empty to use the default settings - -- refer to the configuration section below -} diff --git a/.config/nvim/after/plugin/which.rc.lua b/.config/nvim/after/plugin/which.rc.lua new file mode 120000 index 0000000..5b831ee --- /dev/null +++ b/.config/nvim/after/plugin/which.rc.lua @@ -0,0 +1 @@ +../available/which.rc.lua \ No newline at end of file diff --git a/.config/nvim/after/plugin/windows.rc.lua b/.config/nvim/after/plugin/windows.rc.lua new file mode 120000 index 0000000..7176afd --- /dev/null +++ b/.config/nvim/after/plugin/windows.rc.lua @@ -0,0 +1 @@ +../available/windows.rc.lua \ No newline at end of file diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index d97fcbe..e5ffd3f 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -21,16 +21,15 @@ call plug#begin('~/.config/nvim/plugins') "Plug 'nvim-treesitter/nvim-treesitter-textobjects' "Plug 'nvim-treesitter/playground' "Plug 'p00f/nvim-ts-rainbow' -"Plug 'ray-x/lsp_signature.nvim' "Plug 'vim-test/vim-test' -Plug 'RRethy/vim-illuminate' +"Plug 'RRethy/vim-illuminate' Plug 'Saecki/crates.nvim' | Plug 'jose-elias-alvarez/null-ls.nvim' Plug 'andrewferrier/debugprint.nvim' Plug 'cdelledonne/vim-cmake' +Plug 'danymat/neogen' +Plug 'ftilde/vim-ugdb' Plug 'jubnzv/virtual-types.nvim' Plug 'krady21/compiler-explorer.nvim' -Plug 'liuchengxu/vista.vim' -Plug 'matsui54/denops-signature_help' Plug 'mizlan/iswap.nvim' Plug 'neovim/nvim-lspconfig' Plug 'numToStr/Comment.nvim' @@ -60,7 +59,6 @@ Plug 'wellle/targets.vim' " }}} " Git integration {{{ -"Plug 'APZelos/blamer.nvim' Plug 'lewis6991/gitsigns.nvim' Plug 'tpope/vim-fugitive' " }}} @@ -77,21 +75,14 @@ Plug 'kergoth/vim-bitbake' " Bitbake templates and syntax " Other plugins (external tools, etc) {{{ "Plug 'JMcKiern/vim-shoot' "Plug 'MortenStabenau/matlab-vim' -"Plug 'glacambre/firenvim' "Plug 'junegunn/goyo.vim' Plug 'folke/which-key.nvim' -Plug 'lukas-reineke/virt-column.nvim' Plug 'nvim-lualine/lualine.nvim' Plug 'protex/better-digraphs.nvim' " }}} " Note taking {{{ -" select one note taking app -"Plug 'SidOfc/mkdx' -"Plug 'michal-h21/vim-zettel' -"Plug 'michal-h21/vimwiki-sync' -"Plug 'nvim-neorg/neorg' -"Plug 'vimwiki/vimwiki', { 'branch': 'dev' } +Plug 'nvim-neorg/neorg' Plug 'jakewvincent/mkdnflow.nvim' " }}} @@ -106,25 +97,33 @@ Plug 'stevearc/dressing.nvim' " Testing phase {{{ "Plug 'RRethy/vim-hexokinase', { 'do': 'make hexokinase' } +"Plug 'euclio/vim-markdown-composer', {'do': ':!cargo build --release --locked'} "Plug 'https://git.sr.ht/%7Ewhynothugo/lsp_lines.nvim' "Plug 'kevinhwang91/nvim-ufo' | Plug 'kevinhwang91/promise-async' "Plug 'mfussenegger/nvim-dap' -"Plug 'mfussenegger/nvim-dap' +"Plug 'narutoxy/silicon.lua' "Plug 'nguyenvukhang/nvim-toggler' +"Plug 'rgroli/other.nvim' " Currently doesn't support C/C++ "Plug 'smolovk/projector.nvim' Plug 'AckslD/nvim-FeMaco.lua' Plug 'Pocco81/true-zen.nvim' Plug 'anuvyklack/fold-preview.nvim' | Plug 'anuvyklack/keymap-amend.nvim' Plug 'anuvyklack/pretty-fold.nvim' Plug 'anuvyklack/windows.nvim' | Plug 'anuvyklack/middleclass' | Plug 'anuvyklack/animation.nvim' -Plug 'euclio/vim-markdown-composer', {'do': ':!cargo build --release --locked'} +Plug 'fenetikm/falcon' Plug 'frabjous/knap' Plug 'ftilde/vim-ugdb' Plug 'gorbit99/codewindow.nvim' Plug 'https://gitlab.com/yorickpeterse/nvim-window.git' -Plug 'kevinhwang91/nvim-ufo' | Plug 'kevinhwang91/promise-async' -Plug 'nvim-neorg/neorg' +Plug 'krivahtoo/silicon.nvim', { 'do': './install.sh' } +Plug 'lukas-reineke/virt-column.nvim' +Plug 'nat-418/boole.nvim' +Plug 'nullchilly/fsread.nvim' +Plug 'nyngwang/murmur.lua' Plug 'samodostal/image.nvim' +Plug 'simrat39/symbols-outline.nvim' +Plug 'toppair/peek.nvim', {'do': ':!deno task --quiet build:fast'} +Plug 'wuelnerdotexe/vim-enfocado' Plug 'ziontee113/icon-picker.nvim' " }}} @@ -148,18 +147,18 @@ set laststatus=2 lua << EOF require("virt-column").setup { } -vim.o.winwidth = 10 -vim.o.winminwidth = 10 -require("windows").setup() +require('compiler-explorer').setup() +require("symbols-outline").setup() EOF set colorcolumn=80 set background=dark -"Material scheme: -"let g:material_style = "deep ocean" -colorscheme enfocado -lua require('lualine').setup { options = { theme = 'enfocado' } } +"colorscheme enfocado +"lua require('lualine').setup { options = { theme = 'enfocado' } } + +colorscheme falcon +lua require('lualine').setup { options = { theme = 'falcon' } } "highlight MatchParen cterm=underline ctermbg=black ctermfg=NONE "highlight VirtColumn ctermfg=DarkGrey ctermbg=NONE @@ -279,20 +278,15 @@ lua << EOF vim.o.splitbelow = true vim.o.splitright = true -require('fold-preview').setup() +require('pretty-fold').setup() require('pretty-fold').ft_setup('cpp', { process_comment_signs = false, - comment_signs = { - '/**', -- C++ Doxygen comments - }, - stop_words = { - -- ╟─ "*" ──╭───────╮── "@brief" ──╭───────╮──╢ - -- ╰─ WSP ─╯ ╰─ WSP ─╯ - '%*%s*@brief%s*', - }, + --comment_signs = { + -- '//', -- C++ Doxygen comments + --}, }) +require('fold-preview').setup() --require('lsp_lines').setup() -require('compiler-explorer').setup() require('image').setup { render = {