├── .gitignore ├── .luarc.json ├── .stylua.toml ├── README.md ├── ftplugin └── java.lua ├── init.lua ├── logo └── neovim.png ├── lua ├── config │ ├── autocommands.lua │ ├── cursor.lua │ ├── keymaps.lua │ ├── lazy.lua │ ├── lsp │ │ ├── diagnostic_config.lua │ │ ├── diagnostic_keymaps.lua │ │ ├── global.lua │ │ ├── lsp_keymaps.lua │ │ └── servers │ │ │ ├── cssls.lua │ │ │ ├── emmet_language_server.lua │ │ │ ├── html.lua │ │ │ ├── jdtls.lua │ │ │ ├── jsonls.lua │ │ │ ├── ltex_plus.lua │ │ │ ├── lua_ls.lua │ │ │ ├── ruff.lua │ │ │ ├── rust_analyser.lua │ │ │ ├── tailwindcss.lua │ │ │ ├── texlab.lua │ │ │ ├── tinymist.lua │ │ │ ├── ts_ls.lua │ │ │ ├── vue_ls.lua │ │ │ └── yamlls.lua │ ├── options.lua │ └── usercommands.lua ├── lib │ └── icons.lua ├── plugins │ ├── aerial.lua │ ├── blink.lua │ ├── bufferline.lua │ ├── ccc.lua │ ├── cheatsheet.lua │ ├── cinnamon.lua │ ├── cmp.lua │ ├── codesnap.lua │ ├── codewindow.lua │ ├── colorful-winsep.lua │ ├── comments.lua │ ├── conform.lua │ ├── csvview.lua │ ├── dap │ │ └── debug_adapter.lua │ ├── dashboard.lua │ ├── dressing.lua │ ├── easytables.lua │ ├── feline.lua │ ├── flash.lua │ ├── focus.lua │ ├── fzf-lua.lua │ ├── git.lua │ ├── glance.lua │ ├── grug-far.lua │ ├── hlchunk.lua │ ├── hop.lua │ ├── image_preview.lua │ ├── inc_rename.lua │ ├── indent-blankline.lua │ ├── init.lua │ ├── lazydev.lua │ ├── ltex-extra.lua │ ├── lualine.lua │ ├── luasnip.lua │ ├── markdown-preview.lua │ ├── markdown-table-mode.lua │ ├── markview.lua │ ├── mason-lspconfig.lua │ ├── mason.lua │ ├── mini-align.lua │ ├── mini-indentscope.lua │ ├── multicursor.lua │ ├── neo-tree.lua │ ├── noice.lua │ ├── nvim-autopairs.lua │ ├── nvim-dap-ui.lua │ ├── nvim-dap.lua │ ├── nvim-highlight-colors.lua │ ├── nvim-jdtls.lua │ ├── nvim-lint.lua │ ├── nvim-lspconfig.lua │ ├── nvim-navic.lua │ ├── nvim-notify.lua │ ├── nvim-spider.lua │ ├── nvim-surround.lua │ ├── nvim-toggler.lua │ ├── nvim-tree.lua │ ├── oil.lua │ ├── outline.lua │ ├── rainbow-delimiters.lua │ ├── rest.lua │ ├── snipe.lua │ ├── ssr.lua │ ├── statuscol.lua │ ├── symbols.lua │ ├── telescope.lua │ ├── theme │ │ └── catppuccin.lua │ ├── toggleterm.lua │ ├── treesitter.lua │ ├── treewalker.lua │ ├── trouble.lua │ ├── typst-preview.lua │ ├── ufo.lua │ ├── ultimate-autopair.lua │ ├── vim-rest-console.lua │ ├── vim-visual-multi.lua │ ├── vimtex.lua │ ├── web_devicons.lua │ ├── which-key.lua │ ├── yanky.lua │ └── zen-mode.lua └── utils │ ├── check_appearence.lua │ ├── init.lua │ ├── ltex_lang.lua │ ├── set_keymap.lua │ ├── spell_add_menu.lua │ ├── spelling.lua │ └── split.lua ├── snippets └── lua.json └── spell ├── de.utf-8.spl ├── de.utf-8.sug ├── el.utf-8.spl ├── el.utf-8.sug ├── en.utf-8.spl └── en.utf-8.sug /.gitignore: -------------------------------------------------------------------------------- 1 | # Ignore Logs 2 | *.log 3 | 4 | # .DSStore Mac file 5 | .DS_Store 6 | 7 | # Lazy log file 8 | lazy-lock.json 9 | 10 | # Some dummy folders 11 | test/ 12 | test2/ 13 | 14 | # Logo folder 15 | logo/ 16 | 17 | # Java Degug folders 18 | debug/ 19 | vscode-java-test/ 20 | java-debug/ 21 | js-debug/ 22 | 23 | # Spell files 24 | *.add 25 | *add.spl 26 | -------------------------------------------------------------------------------- /.luarc.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://raw.githubusercontent.com/sumneko/vscode-lua/master/setting/schema.json", 3 | "runtime.version": "LuaJIT", 4 | "runtime.path": [ 5 | "lua", 6 | "lua/?.lua", 7 | "lua/?/init.lua", 8 | "?.lua", 9 | "?/init.lua", 10 | "$XDG_DATA_HOME/nvim/lazy", 11 | "$XDG_DATA_HOME/nvim/lazy/catppuccin/lua/catppuccin" 12 | ], 13 | "workspace.checkThirdParty": false, 14 | "workspace.library": [ 15 | "$VIMRUNTIME/lua", 16 | "${3rd}/luv/library", 17 | "lua/lib/icons.lua", 18 | "$XDG_DATA_HOME/nvim/lazy/catppuccin/lua/catppuccin", 19 | "$XDG_DATA_HOME/nvim/lazy/multicursor.nvim/lua/multicursor-nvim", 20 | "$XDG_DATA_HOME/nvim/lazy/markview.nvim/lua/markview" 21 | ], 22 | "hint.enable": true, 23 | "hint.setType": true, 24 | "hint.arrayIndex": "Disable", 25 | "diagnostics.disable": ["missing-fields"], 26 | "telemetry.enable": false 27 | } 28 | -------------------------------------------------------------------------------- /.stylua.toml: -------------------------------------------------------------------------------- 1 | indent_type = "Spaces" 2 | quote_style = "AutoPreferSingle" 3 | -------------------------------------------------------------------------------- /ftplugin/java.lua: -------------------------------------------------------------------------------- 1 | -- ╭──────────────────────────────────────────────────────────╮ 2 | -- │ JAVA CONFIGURATION │ 3 | -- ╰──────────────────────────────────────────────────────────╯ 4 | 5 | local jdtls_path = vim.fn.stdpath('data') .. '/mason/packages/jdtls' 6 | 7 | local jdtls_bin_folder = jdtls_path .. 'bin/' 8 | local jdtls_binary_path = jdtls_bin_folder .. 'jdtls' 9 | 10 | local path_to_lsp_server = jdtls_path .. '/config_mac' 11 | local path_to_plugins = jdtls_path .. '/plugins/' 12 | local path_to_jar = path_to_plugins .. 'org.eclipse.equinox.launcher_1.6.800.v20240330-1250.jar' 13 | local lombok_path = jdtls_path .. '/lombok.jar' 14 | 15 | local root_markers = { '.git', 'mvnw', 'gradlew', 'pom.xml', 'build.gradle' } 16 | local root_dir = vim.fs.dirname(vim.fs.find(root_markers, { upward = true })[1]) 17 | 18 | local project_name = vim.fn.fnamemodify(vim.fn.getcwd(), ':p:h:t') 19 | local workspace_dir = vim.fn.stdpath('data') .. '/site/java/workspace-root/' .. project_name 20 | 21 | local bundles = { 22 | vim.fn.glob( 23 | '/Users/ilias/.config/nvim/java-debug/com.microsoft.java.debug.plugin/target/com.microsoft.java.debug.plugin-*.jar', 24 | 1 25 | ), 26 | } 27 | 28 | vim.list_extend(bundles, vim.split(vim.fn.glob('/Users/ilias/.config/nvim/vscode-java-test/server/*.jar', 1), '\n')) 29 | 30 | local extendedClientCapabilities = require('jdtls').extendedClientCapabilities 31 | extendedClientCapabilities.onCompletionItemSelectedCommand = 'editor.action.triggerParameterHints' 32 | extendedClientCapabilities.resolveAdditionalTextEditsSupport = true 33 | 34 | local config = { 35 | cmd = { 36 | 'java', -- '/opt/homebrew/Cellar/openjdk@17/17.0.5/libexec/openjdk.jdk/Contents/Home', 37 | 38 | '-Declipse.application=org.eclipse.jdt.ls.core.id1', 39 | '-Dosgi.bundles.defaultStartLevel=4', 40 | '-Declipse.product=org.eclipse.jdt.ls.core.product', 41 | '-Dlog.protocol=true', 42 | '-Dlog.level=ALL', 43 | '-javaagent:' .. lombok_path, 44 | '-Xmx1g', 45 | '--add-modules=ALL-SYSTEM', 46 | '--add-opens', 47 | 'java.base/java.util=ALL-UNNAMED', 48 | '--add-opens', 49 | 'java.base/java.lang=ALL-UNNAMED', 50 | 51 | '-jar', 52 | path_to_jar, 53 | '-configuration', 54 | path_to_lsp_server, 55 | '-data', 56 | workspace_dir, 57 | }, 58 | root_dir = root_dir, 59 | vim.list_extend( 60 | bundles, 61 | vim.split(vim.fn.glob('/Users/ilias/.config/debug/vscode-java-test/server/*.jar', 1), '\n') 62 | ), 63 | 64 | on_attach = function(client, bufnr) 65 | vim.lsp.inlay_hint.enable(true, { bufnr = bufnr }) 66 | end, 67 | 68 | settings = { 69 | java = { 70 | eclipse = { 71 | downloadSources = true, 72 | }, 73 | maven = { 74 | downloadSources = true, 75 | }, 76 | inlayHints = { 77 | parameterNames = { 78 | enabled = 'all', 79 | }, 80 | }, 81 | format = { 82 | enabled = true, 83 | }, 84 | signatureHelp = { 85 | enabled = true, 86 | }, 87 | referencesCodeLens = { 88 | enabled = true, 89 | }, 90 | references = { 91 | includeDecompiledSources = true, 92 | }, 93 | completion = { 94 | favoriteStaticMembers = { 95 | 'org.hamcrest.MatcherAssert.assertThat', 96 | 'org.hamcrest.Matchers.*', 97 | 'org.hamcrest.CoreMatchers.*', 98 | 'org.junit.jupiter.api.Assertions.*', 99 | 'java.util.Objects.requireNonNull', 100 | 'java.util.Objects.requireNonNullElse', 101 | 'org.mockito.Mockito.*', 102 | }, 103 | filteredTypes = { 104 | 'com.sun.*', 105 | 'io.micrometer.shaded.*', 106 | 'java.awt.*', 107 | 'jdk.*', 108 | 'sun.*', 109 | }, 110 | guessMethodArguments = true, 111 | }, 112 | contentProvider = { 113 | preferred = 'fernflower', 114 | }, 115 | codeGeneration = { 116 | toString = { 117 | template = '${object.className}{${member.name()}=${member.value}, ${otherMembers}}', 118 | }, 119 | hashCodeEquals = { 120 | useJava7Objects = true, 121 | }, 122 | useBlocks = true, 123 | }, 124 | extendedClientCapabilities = extendedClientCapabilities, 125 | }, 126 | }, 127 | 128 | init_options = { 129 | bundles = bundles, 130 | }, 131 | 132 | -- init_options = { 133 | -- bundles = { 134 | -- vim.fn.glob('/Users/ilias/.config/nvim/java-debug/com.microsoft.java.debug.plugin/target/com.microsoft.java.debug.plugin-*.jar', 1), 135 | -- }, 136 | -- }, 137 | 138 | -- on_attach = function (client, bufnr) 139 | -- require('jdtls').setup_dap({ hotcodereplace = 'auto' }) 140 | -- end 141 | } 142 | require('jdtls').start_or_attach(config) 143 | 144 | -- Keymaps 145 | vim.keymap.set('n', '', "lua require'jdtls'.organize_imports()", { desc = 'Organize Imports' }) 146 | vim.keymap.set({ 'n', 'v' }, 'crv', "lua require('jdtls').extract_variable()", { desc = 'Extract Variable' }) 147 | vim.keymap.set({ 'n', 'v' }, 'crc', "lua require('jdtls').extract_constant()", { desc = 'Extract Constant' }) 148 | vim.keymap.set('v', 'crm', "lua require('jdtls').extract_method(true)", { desc = 'Extract Method' }) 149 | 150 | -- Keymaps for nvim-dap 151 | vim.keymap.set('n', 'df', "lua require'jdtls'.test_class()", { desc = 'Test Class' }) 152 | vim.keymap.set('n', 'dn', "lua require'jdtls'.test_nearest_method()", { desc = 'Test Nearest Method' }) 153 | 154 | -- ╭──────────────────────────────────────────────────────────╮ 155 | -- │ Introductions for Debug │ 156 | -- ╰──────────────────────────────────────────────────────────╯ 157 | -- Open a .java file 158 | -- Set a breakpoint with db 'DapToggleBreakpoint' 159 | -- Call the command: 160 | -- require('jdtls.dap').setup_dap_main_class_configs() 161 | -- or: 162 | -- JdtUpdateDebugConfigs 163 | -- Then continue the debug with dc 'DapContinue' 164 | -------------------------------------------------------------------------------- /init.lua: -------------------------------------------------------------------------------- 1 | require('config.lazy') 2 | require('config.options') 3 | require('config.keymaps') 4 | require('config.autocommands') 5 | require('config.usercommands') 6 | require('utils.init') 7 | require('config.cursor') 8 | 9 | require('config.lsp.global') 10 | 11 | local lsp_path = vim.fn.stdpath('config') .. '/lua/config/lsp/servers' 12 | 13 | for _, file in ipairs(vim.fn.readdir(lsp_path)) do 14 | if file:match('%.lua$') and file ~= 'global.lua' then 15 | local module_name = 'config.lsp.servers.' .. file:gsub('%.lua$', '') 16 | require(module_name) 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /logo/neovim.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilias777/nvim/b8e3ce0f656f58186ef409108a876355af68e457/logo/neovim.png -------------------------------------------------------------------------------- /lua/config/autocommands.lua: -------------------------------------------------------------------------------- 1 | -- ╭─────────────────────────────────────────────────────────╮ 2 | -- │ HIGHLIGHT SELECTET TEXT │ 3 | -- ╰─────────────────────────────────────────────────────────╯ 4 | vim.api.nvim_create_autocmd('TextYankPost', { 5 | callback = function() 6 | vim.highlight.on_yank({ 7 | higroup = 'IncSearch', 8 | timeout = 100, 9 | }) 10 | end, 11 | }) 12 | 13 | -- ╭─────────────────────────────────────────────────────────╮ 14 | -- │ CHANGE CURSORLINE │ 15 | -- ╰─────────────────────────────────────────────────────────╯ 16 | -- vim.api.nvim_create_autocmd({ 'InsertLeave', 'WinEnter' }, { 17 | -- callback = function() 18 | -- vim.opt.cursorline = true 19 | -- end, 20 | -- }) 21 | -- 22 | -- vim.api.nvim_create_autocmd({ 'InsertEnter', 'WinLeave' }, { 23 | -- callback = function() 24 | -- vim.opt.cursorline = false 25 | -- end, 26 | -- }) 27 | 28 | -- ╭─────────────────────────────────────────────────────────╮ 29 | -- │ DISABLE INLAY HINTS FOR SPECIFIC FILETYPES │ 30 | -- ╰─────────────────────────────────────────────────────────╯ 31 | -- vim.api.nvim_create_autocmd('FileType', { 32 | -- pattern = { 'zsh', 'conf' }, 33 | -- callback = function() 34 | -- vim.lsp.inlay_hint.enable(0, false) 35 | -- end, 36 | -- }) 37 | 38 | -- ╭─────────────────────────────────────────────────────────╮ 39 | -- │ FORCE TREESITTER TO WORK WITH SPECIFIC FILESTYPES │ 40 | -- ╰─────────────────────────────────────────────────────────╯ 41 | -- vim.api.nvim_create_autocmd('FileType', { 42 | -- pattern = { 'zsh', 'conf' }, 43 | -- callback = function() 44 | -- vim.bo.filetype = 'sh' 45 | -- end, 46 | -- }) 47 | 48 | -- ╭─────────────────────────────────────────────────────────╮ 49 | -- │ FORCE TREESITTER TO WORK WITH SPECIFIC FILESTYPES │ 50 | -- ╰─────────────────────────────────────────────────────────╯ 51 | -- vim.filetype.add({ 52 | -- extension = { 53 | -- sh = 'sh', 54 | -- zsh = 'sh', 55 | -- conf = 'sh', 56 | -- }, 57 | -- filename = { 58 | -- ['.zshrc'] = 'sh', 59 | -- ['.zshenv'] = 'sh', 60 | -- ['.conf'] = 'sh', 61 | -- }, 62 | -- }) 63 | 64 | -- ╭─────────────────────────────────────────────────────────╮ 65 | -- │ QUIT SOME WINDOWS WITH Q │ 66 | -- ╰─────────────────────────────────────────────────────────╯ 67 | vim.api.nvim_create_autocmd('FileType', { 68 | pattern = { 'help', 'qf', 'man', 'oil', 'aerial-nav', 'query', 'checkhealth' }, 69 | callback = function() 70 | vim.keymap.set('n', 'q', 'bd', { silent = true, buffer = true }) 71 | end, 72 | }) 73 | 74 | -- ╭─────────────────────────────────────────────────────────╮ 75 | -- │ QUIT DIFFVIEW WITH Q │ 76 | -- ╰─────────────────────────────────────────────────────────╯ 77 | vim.api.nvim_create_autocmd('FileType', { 78 | pattern = { 'DiffViewFiles' }, 79 | callback = function() 80 | vim.keymap.set('n', 'q', 'tabc', { silent = true, buffer = true }) 81 | end, 82 | }) 83 | 84 | -- ╭─────────────────────────────────────────────────────────╮ 85 | -- │ OPEN HELP IN A NEW TAB │ 86 | -- ╰─────────────────────────────────────────────────────────╯ 87 | vim.api.nvim_create_autocmd('FileType', { 88 | pattern = 'help', 89 | command = ':wincmd T', 90 | }) 91 | 92 | -- ╭─────────────────────────────────────────────────────────╮ 93 | -- │ FORMATOPTIONS │ 94 | -- ╰─────────────────────────────────────────────────────────╯ 95 | vim.api.nvim_create_autocmd({ 'BufEnter' }, { 96 | callback = function() 97 | vim.opt.formatoptions:remove({ 'o', 'r', 'c' }) 98 | vim.opt.formatoptions:append({ 't' }) 99 | end, 100 | }) 101 | 102 | -- ╭─────────────────────────────────────────────────────────╮ 103 | -- │ JUMP TO LAST EDIT POSITION ON OPENING FILE │ 104 | -- ╰─────────────────────────────────────────────────────────╯ 105 | vim.api.nvim_create_autocmd('BufReadPost', { 106 | desc = 'Open file at the last position it was edited earlier', 107 | pattern = '*', 108 | command = 'silent! normal! g`"zv', 109 | }) 110 | 111 | -- ╭─────────────────────────────────────────────────────────╮ 112 | -- │ DOCUMENT HIGHLIGHT ON CURSORHOLD │ 113 | -- ╰─────────────────────────────────────────────────────────╯ 114 | -- vim.api.nvim_create_autocmd({ 'CursorHold', 'CursorHoldI' }, { 115 | -- callback = function() 116 | -- vim.lsp.buf.document_highlight() 117 | -- end, 118 | -- }) 119 | -- vim.api.nvim_create_autocmd('CursorMoved', { 120 | -- callback = function() 121 | -- vim.lsp.buf.clear_references() 122 | -- end, 123 | -- }) 124 | 125 | -- ╭─────────────────────────────────────────────────────────╮ 126 | -- │ MESSAGE IF MACRO IS STOPPED │ 127 | -- ╰─────────────────────────────────────────────────────────╯ 128 | local macro_group = vim.api.nvim_create_augroup('MacroRecording', { clear = true }) 129 | vim.api.nvim_create_autocmd('RecordingLeave', { 130 | group = macro_group, 131 | callback = function() 132 | -- Display a message when macro recording stops 133 | print('Macro recording stopped') 134 | end, 135 | }) 136 | 137 | -- ╭─────────────────────────────────────────────────────────╮ 138 | -- │ VIM-VISUAL-MULTI │ 139 | -- ╰─────────────────────────────────────────────────────────╯ 140 | -- local visual_multi_group = vim.api.nvim_create_augroup('VisualMulti', { clear = true }) 141 | -- vim.api.nvim_create_autocmd('User', { 142 | -- pattern = 'visual_multi_start', 143 | -- callback = function() 144 | -- -- vim.cmd('NoiceDisable') 145 | -- vim.lsp.inlay_hint.enable(false) 146 | -- end, 147 | -- group = visual_multi_group, 148 | -- }) 149 | -- vim.api.nvim_create_autocmd('User', { 150 | -- pattern = 'visual_multi_exit', 151 | -- callback = function() 152 | -- -- vim.cmd('NoiceEnable') 153 | -- vim.lsp.inlay_hint.enable(true) 154 | -- end, 155 | -- group = visual_multi_group, 156 | -- }) 157 | 158 | -- ╭─────────────────────────────────────────────────────────╮ 159 | -- │ GITCOMMIT MESSAGE │ 160 | -- ╰─────────────────────────────────────────────────────────╯ 161 | local commit = vim.api.nvim_create_augroup('CommitMessage', { clear = true }) 162 | vim.api.nvim_create_autocmd('FileType', { 163 | pattern = 'gitcommit', 164 | group = commit, 165 | callback = function() 166 | vim.opt_local.spell = true 167 | vim.opt_local.textwidth = 72 168 | end, 169 | }) 170 | -------------------------------------------------------------------------------- /lua/config/cursor.lua: -------------------------------------------------------------------------------- 1 | local bg = vim.o.background 2 | local palette_dark = require('catppuccin.palettes').get_palette('mocha') 3 | local palette_light = require('catppuccin.palettes').get_palette('latte') 4 | local color = bg == 'dark' and palette_dark or palette_light 5 | local U = require('catppuccin.utils.colors') 6 | 7 | vim.api.nvim_create_autocmd('ModeChanged', { 8 | pattern = { '*:v', '*:V', '*:', 'v:*', 'V:*', ':*', '*:R', 'R:*' }, 9 | callback = function() 10 | local mode = vim.fn.mode() 11 | 12 | if mode == 'v' or mode == 'V' or mode == '\22' then 13 | vim.cmd('highlight Cursor guibg=' .. color.mauve) 14 | elseif mode == 'R' or mode == 'r' then 15 | vim.cmd('highlight CursorLine guibg=' .. U.darken(color.pink, 0.15, color.base)) 16 | else 17 | vim.cmd('highlight Cursor guibg=' .. color.text) 18 | vim.cmd('highlight CursorLine guibg=' .. color.mantle) 19 | end 20 | end, 21 | }) 22 | 23 | vim.on_key(function(key) 24 | if key == 'r' and vim.fn.mode() == 'n' then 25 | vim.cmd('highlight CursorLine guibg=' .. U.darken(color.pink, 0.15, color.base)) 26 | vim.defer_fn(function() 27 | if vim.fn.mode() == 'n' then 28 | vim.cmd('highlight CursorLine guibg=' .. color.mantle) 29 | end 30 | end, 100) 31 | end 32 | end, vim.api.nvim_create_namespace('cursor_replace_one')) 33 | 34 | vim.api.nvim_create_autocmd({ 'InsertEnter', 'WinLeave' }, { 35 | callback = function() 36 | vim.cmd('highlight CursorLine guibg=' .. U.darken(color.green, 0.15, color.base)) 37 | end, 38 | }) 39 | 40 | vim.api.nvim_create_autocmd({ 'InsertLeave', 'WinEnter' }, { 41 | callback = function() 42 | vim.cmd('highlight CursorLine guibg=' .. color.mantle) 43 | end, 44 | }) 45 | -------------------------------------------------------------------------------- /lua/config/keymaps.lua: -------------------------------------------------------------------------------- 1 | -- ╭──────────────────────────────────────────────────────────╮ 2 | -- │ BASIC KEYMAPS │ 3 | -- ╰──────────────────────────────────────────────────────────╯ 4 | 5 | -- Function helpers 6 | local Utils = require('utils.split') 7 | 8 | -- Exit from insert mode 9 | vim.keymap.set('i', 'kj', '', { desc = 'Exit insert mode' }) 10 | 11 | -- Better up/down 12 | vim.keymap.set({ 'n', 'x' }, 'j', "v:count == 0 ? 'gj' : 'j'", { expr = true, silent = true }) 13 | vim.keymap.set({ 'n', 'x' }, 'k', "v:count == 0 ? 'gk' : 'k'", { expr = true, silent = true }) 14 | 15 | -- Search 16 | vim.keymap.set('n', 'ƒ', '/') 17 | 18 | -- Search for matches within visual selection 19 | -- vim.keymap.set('x', '/', '/\\%V') 20 | 21 | -- Search and replace word under the cursor 22 | vim.keymap.set( 23 | 'n', 24 | 'R', 25 | ':%s/\\<\\>//gI', 26 | { desc = 'Search and replace word under the cursor' } 27 | ) 28 | 29 | -- Search and replace in visual selection 30 | vim.keymap.set('x', 'r', [[:s/\%V]], { desc = 'Search and replace in visual selection' }) 31 | 32 | -- norm! command 33 | vim.keymap.set('x', 'n', [[:norm! ]], { desc = 'norm!' }) 34 | 35 | -- For correcting a word in insert mode 36 | -- vim.keymap.set('i', '', 'u[s1z=`]au') 37 | 38 | -- Buffers 39 | vim.keymap.set('n', 'bd', 'bd', { desc = 'Delete Buffer' }) 40 | 41 | -- Move to window (split) using hlkj keys 42 | vim.keymap.set('n', 'h', 'h', { desc = 'Split Left' }) 43 | vim.keymap.set('n', 'l', 'l', { desc = 'Split Right' }) 44 | vim.keymap.set('n', 'k', 'k', { desc = 'Split Up' }) 45 | vim.keymap.set('n', 'j', 'j', { desc = 'Split Down' }) 46 | vim.keymap.set('n', 'm', function() 47 | Utils.max_or_equal() 48 | end, { desc = 'Max or Equal Split' }) 49 | 50 | -- Resize split panes 51 | vim.keymap.set('n', '', 'resize +2', { desc = 'Resize pane up' }) 52 | vim.keymap.set('n', '', 'resize -2', { desc = 'Resize pane down' }) 53 | vim.keymap.set('n', '', 'vertical resize +2', { desc = 'Resize pane left' }) 54 | vim.keymap.set('n', '', 'vertical resize -2', { desc = 'Resize pane right' }) 55 | 56 | -- Move lines 57 | vim.keymap.set('n', '', ':m -2==', { silent = true, desc = 'Move line up' }) 58 | vim.keymap.set('n', '', ':m +1==', { silent = true, desc = 'Move line down' }) 59 | -- vim.keymap.set('i', '', 'm .-2==gi') 60 | -- vim.keymap.set('i', '', 'm .+1==gi') 61 | vim.keymap.set('v', '', ":m '<-2gv=gv", { silent = true, desc = 'Move line up visual' }) 62 | vim.keymap.set('v', '', ":m '>+1gv=gv", { silent = true, desc = 'Move line down visual' }) 63 | 64 | -- Indent lines in visual selection 65 | vim.keymap.set('v', '<', '', '>gv') 67 | 68 | -- Paste 69 | vim.keymap.set('v', 'p', '"_dP') 70 | vim.keymap.set('x', 'p', 'P') 71 | vim.keymap.set('n', 'dD', '"_dd') 72 | 73 | -- Not yanking with 'c' and 'x' 74 | vim.keymap.set({ 'n', 'v' }, 'c', '"_c') 75 | vim.keymap.set('n', 'C', '"_C') 76 | -- vim.keymap.set('n', 'x', '"_x') 77 | 78 | -- Undo 79 | vim.keymap.set('n', 'U', '', { desc = 'Redo' }) 80 | 81 | -- Jump to BoL and EoL without living instert mode 82 | vim.keymap.set('i', '', 'I', { desc = 'Jump to Beginn of Line in insert mode' }) 83 | vim.keymap.set('i', '', 'A', { desc = 'Jump to End of Line in insert mode' }) 84 | 85 | -- Inner quotes 86 | vim.keymap.set({ 'o', 'x' }, 'iq', "i'", { desc = 'Inner Single Quotes' }) 87 | vim.keymap.set({ 'o', 'x' }, 'iQ', 'i"', { desc = 'Inner Double Quotes' }) 88 | 89 | -- Outer quotes 90 | vim.keymap.set({ 'o', 'x' }, 'aq', "2i'", { desc = 'Around Single Quotes' }) 91 | vim.keymap.set({ 'o', 'x' }, 'aQ', '2i"', { desc = 'Around Double Quotes' }) 92 | vim.keymap.set({ 'o', 'x' }, "a'", "2i'", { desc = 'Around Single Quotes' }) 93 | vim.keymap.set({ 'o', 'x' }, 'a"', '2i"', { desc = 'Around Double Quotes' }) 94 | 95 | -- Inner and outer rectangle brackets [] 96 | vim.keymap.set({ 'o', 'x' }, 'ir', 'i[', { desc = 'Inner Brackets' }) 97 | vim.keymap.set({ 'o', 'x' }, 'ar', 'a[', { desc = 'Inner Brackets' }) 98 | 99 | -- Add blank line without leaving normal mode 100 | vim.keymap.set( 101 | 'n', 102 | '', 103 | "call append(line('.') - 1, repeat([''], v:count1))", 104 | { desc = 'Add blank line below' } 105 | ) 106 | vim.keymap.set( 107 | 'n', 108 | '', 109 | "call append(line('.'), repeat([''], v:count1))", 110 | { desc = 'Add blank line below' } 111 | ) 112 | 113 | -- Add komma 114 | -- vim.keymap.set("n", ",,", [[f'a]]) 115 | vim.keymap.set('i', '', 'la,', { silent = true, desc = 'Add komma after character' }) 116 | vim.keymap.set('i', '', '{},hha', { silent = true, desc = 'Add curly with komma {},' }) 117 | 118 | -- Go to last change 119 | vim.keymap.set('n', 'g,', 'g;', { desc = 'Go to newest change' }) 120 | vim.keymap.set('n', 'g;', 'g,', { desc = 'Go to last change' }) 121 | 122 | -- Clear search with 123 | -- vim.keymap.set({ 'i', 'n' }, '', 'noh', { desc = 'Escape and clear hlsearch' }) 124 | 125 | -- Add new file 126 | vim.keymap.set('n', 'fn', 'enew', { desc = 'New File' }) 127 | 128 | -- Indent properly when entering insert mode on empty lines 129 | vim.keymap.set('n', 'i', function() 130 | if vim.api.nvim_get_current_line():find('^%s*$') then 131 | return [["_cc]] 132 | end 133 | return 'i' 134 | end, { expr = true, desc = 'better i' }) 135 | 136 | -- Spelling 137 | vim.keymap.set('n', 'z.', '1z=', { desc = '󰓆 Fix Spelling' }) 138 | -- Choose word from vim.ui.select 139 | -- vim.keymap.set('n', 'z=', function() 140 | -- vim.ui.select( 141 | -- vim.fn.spellsuggest(vim.fn.expand('')), 142 | -- {}, 143 | -- vim.schedule_wrap(function(selected) 144 | -- if selected then 145 | -- vim.cmd('normal! ciw' .. selected) 146 | -- end 147 | -- end) 148 | -- ) 149 | -- end, { desc = 'Spelling suggestions' }) 150 | 151 | -- Messages 152 | -- vim.keymap.set('n', 'mm', 'messages', { desc = 'Messages' }) 153 | 154 | -- Don't yank emty lines with dd 155 | vim.keymap.set('n', 'dd', function() 156 | if vim.fn.getline('.') == '' then 157 | return '"_dd' 158 | end 159 | return 'dd' 160 | end, { expr = true }) 161 | 162 | -- ╭──────────────────────────────────────────────────────────╮ 163 | -- │ PLUGINS RELATED KEYMAPS │ 164 | -- ╰──────────────────────────────────────────────────────────╯ 165 | 166 | -- Bufferline.nvim 167 | vim.keymap.set('n', '', 'BufferLineCyclePrev', { desc = 'Buffer Previous' }) 168 | vim.keymap.set('n', '', 'BufferLineCycleNext', { desc = 'Buffer Next' }) 169 | vim.keymap.set('n', 'bp', 'BufferLineTogglePin', { desc = 'Pin Buffer' }) 170 | vim.keymap.set('n', 'bk', 'BufferLinePick', { desc = 'Pick Buffer' }) 171 | vim.keymap.set('n', 'bo', 'BufferLineCloseOthers', { desc = 'Close Other Buffers' }) 172 | vim.keymap.set('n', 'b', 'BufferLineMovePrev', { desc = 'Move Buffer to the left' }) 173 | vim.keymap.set('n', 'b', 'BufferLineMoveNext', { desc = 'Move Buffer to the right' }) 174 | vim.keymap.set('n', 'b1', 'BufferLineGoToBuffer 1', { desc = 'Go to Buffer 1' }) 175 | vim.keymap.set('n', 'b2', 'BufferLineGoToBuffer 2', { desc = 'Go to Buffer 2' }) 176 | vim.keymap.set('n', 'b3', 'BufferLineGoToBuffer 3', { desc = 'Go to Buffer 3' }) 177 | vim.keymap.set('n', 'b4', 'BufferLineGoToBuffer 4', { desc = 'Go to Buffer 4' }) 178 | vim.keymap.set('n', 'b5', 'BufferLineGoToBuffer 5', { desc = 'Go to Buffer 5' }) 179 | vim.keymap.set('n', 'b6', 'BufferLineGoToBuffer 6', { desc = 'Go to Buffer 6' }) 180 | vim.keymap.set('n', 'b7', 'BufferLineGoToBuffer 7', { desc = 'Go to Buffer 7' }) 181 | vim.keymap.set('n', 'b8', 'BufferLineGoToBuffer 8', { desc = 'Go to Buffer 8' }) 182 | vim.keymap.set('n', 'b9', 'BufferLineGoToBuffer 9', { desc = 'Go to Buffer 9' }) 183 | 184 | -- nvim-treehopper (vm or ym) 185 | vim.keymap.set('o', 'm', [[:lua require 'tsht'.nodes()]], { silent = true, remap = true }) 186 | vim.keymap.set('x', 'm', [[:lua require 'tsht'.nodes()]], { silent = true }) 187 | 188 | -- lazy.nvim 189 | vim.keymap.set('n', 'la', 'Lazy', { desc = 'Open Lazy' }) 190 | vim.keymap.set('n', 'lc', 'Lazy check', { desc = 'Check Lazy Plugins' }) 191 | vim.keymap.set('n', 'ls', 'Lazy sync', { desc = 'Sync Lazy Plugins' }) 192 | 193 | -- nvim-dap 194 | vim.keymap.set( 195 | 'n', 196 | 'dB', 197 | 'lua require"dap".set_breakpoint(vim.fn.input("Breakpoint condition: "))', 198 | { desc = 'Add Conditional Breakpoint' } 199 | ) 200 | vim.keymap.set('n', 'dc', 'DapContinue', { desc = 'Dap Continue' }) 201 | vim.keymap.set('n', 'dsi', 'DapStepInto', { desc = 'Dap Step Into' }) 202 | vim.keymap.set('n', 'dso', 'DapStepOver', { desc = 'Dap Step Over' }) 203 | vim.keymap.set('n', 'dst', 'DapStepOut', { desc = 'Dap Step Out' }) 204 | vim.keymap.set('n', 'dt', 'DapTerminate', { desc = 'Dap Terminate' }) 205 | vim.keymap.set('n', 'dl', 'DapShowLog', { desc = 'Dap Show Log' }) 206 | vim.keymap.set('n', 'dr', 'DapToggleRepl', { desc = 'Dap Toggle Repl' }) 207 | 208 | -- diffview.nvim 209 | vim.keymap.set('n', 'dv', function() 210 | local lib = require('diffview.lib') 211 | local view = lib.get_current_view() 212 | if view then 213 | -- Current tabpage is a Diffview; close it 214 | vim.cmd.DiffviewClose() 215 | else 216 | -- No open Diffview exists: open a new one 217 | vim.cmd.DiffviewOpen() 218 | end 219 | end, { desc = 'Diffview Toggle' }) 220 | 221 | -- noice.nvim 222 | vim.keymap.set('n', 'nn', 'Noice', { desc = 'Noice Messages' }) 223 | vim.keymap.set('n', 'na', 'NoiceAll', { desc = 'Noice All Messages' }) 224 | vim.keymap.set('n', 'nl', 'NoiceLast', { desc = 'Noice Last' }) 225 | vim.keymap.set('n', 'nt', 'NoiceTelescope', { desc = 'Noice Telescope' }) 226 | vim.keymap.set('n', 'ne', 'NoiceErrors', { desc = 'Noice Errors' }) 227 | vim.keymap.set('n', 'ns', function() 228 | require('noice').redirect('Notifications') 229 | end, { desc = 'Noice Notifications' }) 230 | 231 | -- toggleterm.nvim 232 | function _G.set_terminal_keymaps() 233 | local opts = { buffer = 0 } 234 | vim.keymap.set('t', '', [[]], opts) 235 | vim.keymap.set('t', 'kj', [[]], opts) 236 | vim.keymap.set('t', '', [[wincmd h]], opts) 237 | vim.keymap.set('t', '', [[wincmd j]], opts) 238 | vim.keymap.set('t', '', [[wincmd k]], opts) 239 | vim.keymap.set('t', '', [[wincmd l]], opts) 240 | vim.keymap.set('t', '', [[]], opts) 241 | end 242 | vim.cmd('autocmd! TermOpen term://* lua set_terminal_keymaps()') 243 | 244 | -- nvim-treesitter-context 245 | vim.keymap.set('n', 'ct', 'TSContext toggle', { desc = 'Toggle TS Context' }) 246 | 247 | -- ╭──────────────────────────────────────────────────────────╮ 248 | -- │ FOR GREEK KEYBOARD │ 249 | -- ╰──────────────────────────────────────────────────────────╯ 250 | vim.keymap.set('i', '', '', { remap = true }) 251 | -------------------------------------------------------------------------------- /lua/config/lazy.lua: -------------------------------------------------------------------------------- 1 | local lazypath = vim.fn.stdpath('data') .. '/lazy/lazy.nvim' 2 | if not (vim.uv or vim.loop).fs_stat(lazypath) then 3 | local lazyrepo = 'https://github.com/folke/lazy.nvim.git' 4 | local out = vim.fn.system({ 'git', 'clone', '--filter=blob:none', '--branch=stable', lazyrepo, lazypath }) 5 | if vim.v.shell_error ~= 0 then 6 | vim.api.nvim_echo({ 7 | { 'Failed to clone lazy.nvim:\n', 'ErrorMsg' }, 8 | { out, 'WarningMsg' }, 9 | { '\nPress any key to exit...' }, 10 | }, true, {}) 11 | vim.fn.getchar() 12 | os.exit(1) 13 | end 14 | end 15 | vim.opt.runtimepath:prepend(lazypath) 16 | 17 | vim.g.mapleader = ',' 18 | vim.g.maplocalleader = ',' 19 | 20 | local opts = { 21 | ui = { 22 | border = 'single', 23 | icons = { 24 | lazy = '💤', 25 | }, 26 | }, 27 | checker = { 28 | enabled = true, 29 | }, 30 | } 31 | 32 | require('lazy').setup({ import = 'plugins' }, opts) 33 | -------------------------------------------------------------------------------- /lua/config/lsp/diagnostic_config.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | function M.set() 4 | vim.diagnostic.config({ 5 | virtual_text = { 6 | prefix = '', -- Could be '●', '▎', │, 'x', '■', ,  7 | }, 8 | jump = { 9 | float = true, 10 | }, 11 | float = { border = 'single' }, 12 | signs = { 13 | text = { 14 | [vim.diagnostic.severity.ERROR] = ' ', 15 | [vim.diagnostic.severity.WARN] = ' ', 16 | [vim.diagnostic.severity.HINT] = '󰌶 ', 17 | [vim.diagnostic.severity.INFO] = ' ', 18 | }, 19 | numhl = { 20 | [vim.diagnostic.severity.ERROR] = 'DiagnosticSignError', 21 | [vim.diagnostic.severity.WARN] = 'DiagnosticSignWarn', 22 | [vim.diagnostic.severity.HINT] = 'DiagnosticSignHint', 23 | [vim.diagnostic.severity.INFO] = 'DiagnosticSignInfo', 24 | }, 25 | }, 26 | }) 27 | end 28 | 29 | return M 30 | -------------------------------------------------------------------------------- /lua/config/lsp/diagnostic_keymaps.lua: -------------------------------------------------------------------------------- 1 | local keymap = require('utils.set_keymap') 2 | 3 | local M = {} 4 | 5 | function M.set() 6 | keymap.set({ 7 | key = 'd', 8 | cmd = vim.diagnostic.open_float, 9 | desc = 'Open Diagnostic Window', 10 | }) 11 | keymap.set({ 12 | key = '', 13 | cmd = function() 14 | vim.diagnostic.jump({ count = -vim.v.count1 }) 15 | end, 16 | desc = 'Previous Diagnostic', 17 | }) 18 | keymap.set({ 19 | key = '', 20 | cmd = function() 21 | vim.diagnostic.jump({ count = vim.v.count1 }) 22 | end, 23 | desc = 'Next Diagnostic', 24 | }) 25 | keymap.set({ 26 | key = 'q', 27 | cmd = vim.diagnostic.setloclist, 28 | desc = 'Send Diagnostic to Locallist', 29 | }) 30 | keymap.set({ 31 | key = 'gK', 32 | cmd = function() 33 | local new_config = not vim.diagnostic.config().virtual_lines 34 | vim.diagnostic.config({ virtual_lines = new_config }) 35 | end, 36 | desc = 'Toggle diagnostic virtual_lines', 37 | }) 38 | end 39 | 40 | return M 41 | -------------------------------------------------------------------------------- /lua/config/lsp/global.lua: -------------------------------------------------------------------------------- 1 | local diagnostic_config = require('config.lsp.diagnostic_config') 2 | local lsp_keymaps = require('config.lsp.lsp_keymaps') 3 | local diagnostic_keymaps = require('config.lsp.diagnostic_keymaps') 4 | 5 | vim.api.nvim_create_autocmd('LspAttach', { 6 | group = vim.api.nvim_create_augroup('global.lsp', {}), 7 | callback = function(ev) 8 | vim.bo[ev.buf].omnifunc = 'v:lua.vim.lsp.omnifunc' 9 | 10 | -- Get client 11 | local client = vim.lsp.get_client_by_id(ev.data.client_id) 12 | 13 | -- Diagnostic Keymaps 14 | diagnostic_keymaps.set() 15 | 16 | -- LSP Keymaps 17 | lsp_keymaps.set() 18 | 19 | -- Diagnostic Config 20 | diagnostic_config.set() 21 | 22 | -- ── INLAY HINTS ─────────────────────────────────────────── 23 | if client and client.server_capabilities.inlayHintProvider then 24 | vim.lsp.inlay_hint.enable(true) 25 | else 26 | vim.lsp.inlay_hint.enable(false) 27 | end 28 | 29 | -- ── TOGGLE INLAY HINTS ──────────────────────────────────── 30 | if vim.lsp.inlay_hint then 31 | vim.keymap.set('n', 'ih', function() 32 | vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled()) 33 | end, { desc = 'Toggle Inlay Hints' }) 34 | end 35 | 36 | -- ── NVIM-NAVIC ──────────────────────────────────────────── 37 | local navic = require('nvim-navic') 38 | if client and client.server_capabilities.documentSymbolProvider then 39 | vim.o.winbar = "%{%v:lua.require'nvim-navic'.get_location()%}" 40 | navic.attach(client, ev.buf) 41 | end 42 | end, 43 | }) 44 | 45 | vim.lsp.config('*', { 46 | capabilities = require('blink.cmp').get_lsp_capabilities(), 47 | }) 48 | -------------------------------------------------------------------------------- /lua/config/lsp/lsp_keymaps.lua: -------------------------------------------------------------------------------- 1 | local keymap = require('utils.set_keymap') 2 | 3 | local M = {} 4 | 5 | function M.set() 6 | keymap.set({ 7 | key = 'K', 8 | cmd = function() 9 | vim.lsp.buf.hover({ border = 'single' }) 10 | end, 11 | desc = 'Hover', 12 | }) 13 | keymap.set({ 14 | mode = { 'n', 'v' }, 15 | key = 'gra', 16 | cmd = vim.lsp.buf.code_action, 17 | desc = 'LSP Code Action', 18 | }) 19 | keymap.set({ 20 | key = 'grn', 21 | cmd = vim.lsp.buf.rename, 22 | desc = 'LSP Rename', 23 | }) 24 | keymap.set({ 25 | key = 'grr', 26 | cmd = vim.lsp.buf.references, 27 | desc = 'LSP References', 28 | }) 29 | keymap.set({ 30 | key = 'grd', 31 | cmd = vim.lsp.buf.definition, 32 | desc = 'LSP Go to Definition', 33 | }) 34 | keymap.set({ 35 | key = 'grD', 36 | cmd = vim.lsp.buf.declaration, 37 | desc = 'LSP Go to Declaration', 38 | }) 39 | keymap.set({ 40 | key = 'gri', 41 | cmd = vim.lsp.buf.implementation, 42 | desc = 'LSP Go to Implementation', 43 | }) 44 | keymap.set({ 45 | key = 'grf', 46 | cmd = function() 47 | vim.lsp.buf.format({ async = true }) 48 | end, 49 | desc = 'LSP Formatting', 50 | }) 51 | keymap.set({ 52 | key = 'grk', 53 | cmd = function() 54 | vim.lsp.buf.signature_help({ border = 'single' }) 55 | end, 56 | desc = 'LSP Singature Help', 57 | }) 58 | keymap.set({ 59 | key = 'grs', 60 | cmd = vim.lsp.buf.document_symbol, 61 | desc = 'LSP Document Symbols', 62 | }) 63 | keymap.set({ 64 | key = 'grt', 65 | cmd = vim.lsp.buf.type_definition, 66 | desc = 'LSP Type Definition', 67 | }) 68 | keymap.set({ 69 | key = 'grwa', 70 | cmd = vim.lsp.buf.add_workspace_folder, 71 | desc = 'LSP Add Workspace Folder', 72 | }) 73 | keymap.set({ 74 | key = 'grwr', 75 | cmd = vim.lsp.buf.remove_workspace_folder, 76 | desc = 'LSP Remove Workspace Folder', 77 | }) 78 | keymap.set({ 79 | key = 'grwl', 80 | cmd = function() 81 | print(vim.inspect(vim.lsp.buf.list_workspace_folders())) 82 | end, 83 | desc = 'LSP List Workspace Folder', 84 | }) 85 | end 86 | 87 | return M 88 | -------------------------------------------------------------------------------- /lua/config/lsp/servers/cssls.lua: -------------------------------------------------------------------------------- 1 | vim.lsp.config('cssls', { 2 | settings = { 3 | css = { 4 | validate = true, 5 | lint = { unknownAtRules = 'ignore' }, 6 | }, 7 | scss = { 8 | validate = true, 9 | lint = { unknownAtRules = 'ignore' }, 10 | }, 11 | less = { 12 | validate = true, 13 | lint = { unknownAtRules = 'ignore' }, 14 | }, 15 | }, 16 | }) 17 | 18 | vim.lsp.enable('cssls') 19 | -------------------------------------------------------------------------------- /lua/config/lsp/servers/emmet_language_server.lua: -------------------------------------------------------------------------------- 1 | vim.lsp.enable('emmet-language-server') 2 | -------------------------------------------------------------------------------- /lua/config/lsp/servers/html.lua: -------------------------------------------------------------------------------- 1 | vim.lsp.enable('html') 2 | -------------------------------------------------------------------------------- /lua/config/lsp/servers/jdtls.lua: -------------------------------------------------------------------------------- 1 | vim.lsp.enable('jdtls') 2 | -------------------------------------------------------------------------------- /lua/config/lsp/servers/jsonls.lua: -------------------------------------------------------------------------------- 1 | vim.lsp.enable('jsonls') 2 | -------------------------------------------------------------------------------- /lua/config/lsp/servers/ltex_plus.lua: -------------------------------------------------------------------------------- 1 | vim.lsp.config.ltex_plus = { 2 | on_attach = function(client, bufnr) 3 | require('ltex_extra').setup() 4 | end, 5 | } 6 | 7 | vim.lsp.enable('ltex_plus') 8 | -------------------------------------------------------------------------------- /lua/config/lsp/servers/lua_ls.lua: -------------------------------------------------------------------------------- 1 | vim.lsp.enable('lua_ls') 2 | -------------------------------------------------------------------------------- /lua/config/lsp/servers/ruff.lua: -------------------------------------------------------------------------------- 1 | vim.lsp.enable('ruff') 2 | -------------------------------------------------------------------------------- /lua/config/lsp/servers/rust_analyser.lua: -------------------------------------------------------------------------------- 1 | vim.lsp.enable('rust_analyser') 2 | -------------------------------------------------------------------------------- /lua/config/lsp/servers/tailwindcss.lua: -------------------------------------------------------------------------------- 1 | vim.lsp.enable('tailwindcss') 2 | -------------------------------------------------------------------------------- /lua/config/lsp/servers/texlab.lua: -------------------------------------------------------------------------------- 1 | vim.lsp.enable('texlab') 2 | -------------------------------------------------------------------------------- /lua/config/lsp/servers/tinymist.lua: -------------------------------------------------------------------------------- 1 | vim.lsp.config.tinymist = { 2 | on_attach = function(client, bufnr) 3 | -- Pin main file user command 4 | vim.api.nvim_create_user_command('PinMain', function() 5 | client:exec_cmd({ 6 | title = 'Pin', 7 | command = 'tinymist.pinMain', 8 | arguments = { vim.api.nvim_buf_get_name(0) }, 9 | }, { bufnr = bufnr }) 10 | end, {}) 11 | -- Unpin main file user command 12 | vim.api.nvim_create_user_command('UnpinMain', function() 13 | client:exec_cmd({ 14 | title = 'Unpin', 15 | command = 'tinymist.pinMain', 16 | arguments = { vim.v.null }, 17 | }, { bufnr = bufnr }) 18 | end, {}) 19 | -- Use buildin preview command 20 | vim.api.nvim_create_user_command('TypstBuildInPreview', function() 21 | client:exec_cmd({ command = 'tinymist.startDefaultPreview', arguments = { nil } }, { bufnr = bufnr }) 22 | end, {}) 23 | -- Open PDF 24 | vim.api.nvim_create_user_command('OpenPdf', function() 25 | local filepath = vim.api.nvim_buf_get_name(0) 26 | if filepath:match('%.typ$') then 27 | os.execute('open ' .. vim.fn.shellescape(filepath:gsub('%.typ$', '.pdf'))) 28 | end 29 | end, {}) 30 | end, 31 | settings = { 32 | formatterMode = 'typstyle', 33 | exportPdf = 'onSave', 34 | invert_colors = 'auto', 35 | lint = 'enable', 36 | }, 37 | } 38 | 39 | vim.lsp.enable('tinymist') 40 | -------------------------------------------------------------------------------- /lua/config/lsp/servers/ts_ls.lua: -------------------------------------------------------------------------------- 1 | local keymap = require('utils.set_keymap') 2 | 3 | local function set_typescript_keymaps(client, bufnr) 4 | -- Organize Imports 5 | keymap.set({ 6 | key = 'io', 7 | cmd = function() 8 | client:exec_cmd({ 9 | command = '_typescript.organizeImports', 10 | arguments = { vim.api.nvim_buf_get_name(bufnr) }, 11 | }) 12 | end, 13 | desc = 'Organize Imports', 14 | bufnr = bufnr, 15 | }) 16 | 17 | -- Remove Unused Imports 18 | keymap.set({ 19 | key = 'ir', 20 | cmd = function() 21 | vim.lsp.buf.code_action({ 22 | apply = true, 23 | context = { 24 | diagnostics = {}, 25 | ---@diagnostic disable-next-line: assign-type-mismatch 26 | only = { 'source.removeUnusedImports.ts' }, 27 | }, 28 | }) 29 | end, 30 | desc = 'Remove Unused Imports', 31 | bufnr = bufnr, 32 | }) 33 | 34 | -- Add Missing Imports 35 | keymap.set({ 36 | key = 'ai', 37 | cmd = function() 38 | vim.lsp.buf.code_action({ 39 | apply = true, 40 | context = { 41 | diagnostics = {}, 42 | ---@diagnostic disable-next-line: assign-type-mismatch 43 | only = { 'source.addMissingImports.ts' }, 44 | }, 45 | }) 46 | end, 47 | desc = 'Add Missing Imports', 48 | bufnr = bufnr, 49 | }) 50 | end 51 | 52 | vim.api.nvim_create_autocmd('LspAttach', { 53 | group = vim.api.nvim_create_augroup('ts_ls.lsp', { clear = true }), 54 | callback = function(args) 55 | local client = assert(vim.lsp.get_client_by_id(args.data.client_id)) 56 | local bufnr = args.buf 57 | 58 | if client.name == 'ts_ls' then 59 | set_typescript_keymaps(client, bufnr) 60 | end 61 | end, 62 | }) 63 | 64 | local inlayHints = { 65 | includeInlayParameterNameHints = 'all', 66 | includeInlayParameterNameHintsWhenArgumentMatchesName = false, 67 | includeInlayFunctionParameterTypeHints = true, 68 | includeInlayVariableTypeHints = true, 69 | includeInlayPropertyDeclarationTypeHints = true, 70 | includeInlayFunctionLikeReturnTypeHints = true, 71 | includeInlayEnumMemberValueHints = true, 72 | importModuleSpecifierPreference = 'non-relative', 73 | } 74 | 75 | vim.lsp.config.ts_ls = { 76 | settings = { 77 | typescript = { 78 | inlayHints = inlayHints, 79 | }, 80 | javascript = { 81 | inlayHints = inlayHints, 82 | }, 83 | }, 84 | } 85 | 86 | vim.lsp.enable('ts_ls') 87 | -------------------------------------------------------------------------------- /lua/config/lsp/servers/vue_ls.lua: -------------------------------------------------------------------------------- 1 | vim.lsp.config('vue_ls', { 2 | filetypes = { 'typescript', 'javascript', 'javascriptreact', 'typescriptreact', 'vue' }, 3 | init_options = { 4 | vue = { 5 | hybridMode = false, 6 | }, 7 | }, 8 | }) 9 | 10 | vim.lsp.enable('vue_ls') 11 | -------------------------------------------------------------------------------- /lua/config/lsp/servers/yamlls.lua: -------------------------------------------------------------------------------- 1 | vim.lsp.config.yamlls = { 2 | settings = { 3 | yaml = { 4 | validate = true, 5 | hover = true, 6 | completion = true, 7 | format = { 8 | enable = true, 9 | singleQuote = true, 10 | bracketSpacing = true, 11 | }, 12 | editor = { 13 | tabSize = 2, 14 | }, 15 | schemaStore = { 16 | enable = true, 17 | }, 18 | }, 19 | editor = { 20 | tabSize = 2, 21 | }, 22 | }, 23 | } 24 | 25 | vim.lsp.enable('yamlls') 26 | -------------------------------------------------------------------------------- /lua/config/options.lua: -------------------------------------------------------------------------------- 1 | -- Search 2 | vim.opt.ignorecase = true 3 | vim.opt.incsearch = true 4 | vim.opt.smartcase = true 5 | vim.opt.hlsearch = true 6 | 7 | -- Indents, spaces 8 | vim.opt.autoindent = true 9 | vim.opt.smartindent = true 10 | vim.opt.tabstop = 4 11 | vim.opt.shiftwidth = 4 12 | vim.opt.softtabstop = 4 13 | vim.opt.expandtab = true 14 | 15 | -- UI 16 | -- vim.opt.background = 'dark' 17 | vim.opt.number = true 18 | vim.opt.relativenumber = true 19 | vim.opt.showcmd = true 20 | vim.o.cmdheight = 0 21 | vim.opt.signcolumn = 'yes' 22 | vim.opt.scrolloff = 4 23 | vim.opt.sidescrolloff = 10 24 | vim.opt.laststatus = 3 25 | vim.opt.list = true 26 | vim.opt.listchars:append({ tab = '»-' }) 27 | vim.opt.listchars:append({ trail = '·' }) 28 | vim.opt.listchars:append({ extends = '»' }) 29 | vim.opt.listchars:append({ precedes = '«' }) 30 | vim.opt.fillchars:append({ eob = ' ', fold = ' ', foldsep = ' ', foldopen = '', foldclose = '' }) 31 | vim.opt.confirm = true 32 | vim.opt.smoothscroll = true 33 | -- vim.opt.conceallevel = 2 34 | -- vim.opt.pumheight = 10 35 | -- vim.opt.colorcolumn = '100' 36 | 37 | -- Text 38 | vim.opt.textwidth = 100 39 | vim.opt.wrap = false 40 | vim.opt.linebreak = true 41 | vim.opt.breakindent = true 42 | -- vim.opt.encoding = 'utf-8' 43 | 44 | -- Folding 45 | vim.o.foldcolumn = '1' 46 | vim.o.foldlevel = 99 47 | vim.o.foldlevelstart = 99 48 | vim.o.foldenable = true 49 | -- vim.opt.foldmethod = 'expr' 50 | -- vim.opt.foldtext = 'v:lua.vim.treesitter.foldtext()' 51 | -- vim.opt.foldexpr = 'v:lua.vim.treesitter.foldexpr()' 52 | 53 | -- Clipboard 54 | vim.opt.clipboard = 'unnamedplus' 55 | 56 | -- Keys 57 | vim.opt.backspace = { 'indent', 'eol', 'start' } 58 | -- vim.opt.mouse = 'nvi' 59 | 60 | -- Cursor 61 | vim.opt.cursorline = true 62 | vim.opt.cursorcolumn = false 63 | vim.opt.guicursor = { 64 | 'n-v-c:block-Cursor/lCursor-blinkwait1000-blinkon100-blinkoff100', 65 | 'i-ci:ver25-Cursor/lCursor-blinkwait1000-blinkon100-blinkoff100', 66 | 'r:hor50-Cursor/lCursor-blinkwait100-blinkon100-blinkoff100', 67 | } 68 | 69 | -- Path 70 | vim.opt.path:append('**') 71 | 72 | -- Spell 73 | vim.opt.spell = false 74 | vim.opt.spelllang = { 'de' } 75 | 76 | -- Split 77 | vim.opt.splitright = true 78 | vim.opt.splitbelow = true 79 | 80 | -- Undo 81 | vim.opt.undofile = true 82 | vim.opt.undodir = vim.fn.expand('~/.undodir') 83 | 84 | -- Other 85 | vim.g.loaded_netrw = 1 86 | vim.g.loaded_netrwPlugin = 1 87 | 88 | -- Python 89 | vim.g.python3_host_prog = '/Library/Frameworks/Python.framework/Versions/3.11/bin/python3' 90 | 91 | -- Markdown 92 | vim.g.markdown_fenced_languages = { 'html', 'python', 'lua', 'js=javascript' } 93 | 94 | -- Greek langmap 95 | -- stylua: ignore 96 | vim.opt.langmap = 'ΑA,ΒB,ΨC,ΔD,ΕE,ΦF,ΓG,ΗH,ΙI,ΞJ,ΚK,ΛL,ΜM,ΝN,ΟO,ΠP,QQ,ΡR,ΣS,ΤT,ΘU,ΩV,WW,ΧX,ΥY,ΖZ,αa,βb,ψc,δd,εe,φf,γg,ηh,ιi,ξj,κk,λl,μm,νn,οo,πp,qq,ρr,σs,τt,θu,ωv,ςw,χx,υy,ζz' 97 | 98 | -- Open telescope file_browser if nvim has no arguments 99 | -- if vim.fn.argc() == 0 then 100 | -- vim.defer_fn(function() 101 | -- vim.cmd('Telescope file_browser') 102 | -- end, 0) 103 | -- end 104 | 105 | -- For treesitter commentstring 106 | vim.opt.updatetime = 100 107 | vim.g.skip_ts_context_commentstring_module = true 108 | 109 | -- Disable providers for health checks 110 | vim.g.loaded_python3_provider = 0 111 | vim.g.loaded_ruby_provider = 0 112 | vim.g.loaded_perl_provider = 0 113 | vim.g.loaded_node_provider = 0 114 | 115 | -- Disable depreceted messages 116 | -- vim.deprecate = function() end ---@diagnostic disable-line: duplicate-set-field 117 | -------------------------------------------------------------------------------- /lua/config/usercommands.lua: -------------------------------------------------------------------------------- 1 | -- Open GitHub Repo from lazy.nvim 2 | -- url: https://github.com/justinsgithub/dotfiles/blob/main/neovim/.config/nvim/lua/user/commands.lua 3 | vim.api.nvim_create_user_command('OpenGithubRepo', function(_) 4 | local ghpath = vim.api.nvim_eval("shellescape(expand(''))") 5 | local formatpath = ghpath:sub(2, #ghpath - 1) 6 | local repourl = 'https://www.github.com/' .. formatpath 7 | vim.fn.system({ 'open', repourl }) 8 | end, { 9 | desc = 'Open Github Repo', 10 | force = true, 11 | }) 12 | 13 | -- Cleaning registers 14 | vim.api.nvim_create_user_command('ClearReg', function() 15 | print('Clearing registers') 16 | vim.cmd([[ 17 | let regs=split('abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789/-"', '\zs') 18 | for r in regs 19 | call setreg(r, []) 20 | endfor 21 | ]]) 22 | end, {}) 23 | -------------------------------------------------------------------------------- /lua/lib/icons.lua: -------------------------------------------------------------------------------- 1 | return { 2 | diagnostics = { 3 | Error = ' ', 4 | Hint = '󰠠 ', 5 | Information = ' ', 6 | Question = ' ', 7 | Warning = ' ', 8 | }, 9 | documents = { 10 | File = ' ', 11 | FileEmpty = ' ', 12 | Files = ' ', 13 | Folder = ' ', 14 | FolderEmpty = ' ', 15 | OpenFolder = ' ', 16 | OpenFolderEmpty = ' ', 17 | SymLink = ' ', 18 | SymlinkFolder = ' ', 19 | Import = ' ', 20 | }, 21 | git = { 22 | Add = ' ', 23 | AddAlt = ' ', 24 | Branch = ' ', 25 | Diff = ' ', 26 | DiffAlt = ' ', 27 | Ignore = '◌ ', 28 | Mod = ' ', 29 | Octoface = ' ', 30 | Remove = ' ', 31 | RemoveAlt = ' ', 32 | Rename = ' ', 33 | Repo = ' ', 34 | Tag = ' ', 35 | Untrack = ' ', 36 | }, 37 | kind = { 38 | Class = ' ', 39 | Color = ' ', 40 | Constant = ' ', 41 | Constructor = '󰈏 ', 42 | Copilot = ' ', 43 | Enum = ' ', 44 | EnumMember = ' ', 45 | Event = ' ', 46 | Field = ' ', 47 | File = ' ', 48 | Folder = ' ', 49 | Function = '󰊕 ', 50 | Interface = ' ', 51 | Keyword = '󰌆 ', 52 | Method = ' ', 53 | Module = '', 54 | Operator = '󰆕 ', 55 | Property = ' ', 56 | Reference = ' ', 57 | Snippet = ' ', 58 | Struct = ' ', 59 | Text = ' ', 60 | TypeParameter = '󰅲 ', 61 | Unit = ' ', 62 | Value = '󰎠 ', 63 | Variable = '󰆦 ', 64 | }, 65 | type = { 66 | Array = ' ', 67 | Boolean = '⏻ ', 68 | Number = ' ', 69 | Object = ' ', 70 | String = ' ', 71 | }, 72 | ui = { 73 | Arrow = ' ', 74 | ArrowClosed = ' ', 75 | ArrowLeft = ' ', 76 | ArrowOpen = ' ', 77 | ArrowRight = ' ', 78 | Bluetooth = ' ', 79 | Bookmark = ' ', 80 | Bug = ' ', 81 | Calendar = ' ', 82 | Camera = ' ', 83 | Check = ' ', 84 | ChevronRight = '', 85 | Circle = ' ', 86 | CircleSmall = '● ', 87 | CircleSmallEmpty = '○ ', 88 | Clipboard = ' ', 89 | Close = ' ', 90 | Code = ' ', 91 | Collection = ' ', 92 | Color = ' ', 93 | Command = ' ', 94 | Comment = ' ', 95 | Copilot = ' ', 96 | CopilotError = ' ', 97 | Corner = '└ ', 98 | Dashboard = ' ', 99 | Database = ' ', 100 | Download = ' ', 101 | Edit = ' ', 102 | Edge = '│ ', 103 | Electric = ' ', 104 | Eye = ' ', 105 | Fire = ' ', 106 | Firefox = ' ', 107 | Flag = ' ', 108 | Game = ' ', 109 | Gear = ' ', 110 | GitHub = ' ', 111 | Heart = ' ', 112 | History = ' ', 113 | Home = ' ', 114 | Incoming = ' ', 115 | Jump = ' ', 116 | Keyboard = ' ', 117 | Ligthbulb = '󰌵 ', 118 | List = '', 119 | Lock = ' ', 120 | Minus = '‒ ', 121 | Music = '󰝚 ', 122 | Neovim = ' ', 123 | NewFile = ' ', 124 | None = ' ', 125 | Note = ' ', 126 | Outgoing = ' ', 127 | Package = ' ', 128 | Paint = ' ', 129 | Pause = ' ', 130 | Pencil = ' ', 131 | Person = ' ', 132 | Pin = ' ', 133 | Play = ' ', 134 | Plug = ' ', 135 | Plus = ' ', 136 | Power = ' ', 137 | PowerlineArrowLeft = '', 138 | PowerlineArrowRight = '', 139 | PowerlineLeftRounded = '', 140 | PowerlineRightRounded = '', 141 | PowerlineSlantLeft = '', 142 | PowerlineSlantRight = '', 143 | Project = ' ', 144 | Question = ' ', 145 | Reload = ' ', 146 | Rocket = ' ', 147 | Save = '󰆓 ', 148 | Search = ' ', 149 | Separator = '▊', 150 | SeparatorLight = '▍', 151 | SeparatorDashed = '┆', 152 | SignIn = ' ', 153 | SignOut = ' ', 154 | Sleep = '󰒲 ', 155 | Star = ' ', 156 | Table = ' ', 157 | Telescope = ' ', 158 | Terminal = ' ', 159 | Test = ' ', 160 | Time = ' ', 161 | Topline = '‾', 162 | Trash = ' ', 163 | User = ' ', 164 | Vim = ' ', 165 | Wifi = ' ', 166 | Windows = ' ', 167 | }, 168 | } 169 | -------------------------------------------------------------------------------- /lua/plugins/aerial.lua: -------------------------------------------------------------------------------- 1 | return { 2 | 'stevearc/aerial.nvim', 3 | enabled = false, 4 | cmd = 'AerialToggle', 5 | dependencies = { 6 | 'nvim-treesitter/nvim-treesitter', 7 | 'nvim-tree/nvim-web-devicons', 8 | }, 9 | opts = { 10 | layout = { 11 | width = 60, 12 | }, 13 | }, 14 | } 15 | -------------------------------------------------------------------------------- /lua/plugins/blink.lua: -------------------------------------------------------------------------------- 1 | return { 2 | 'saghen/blink.cmp', 3 | enabled = true, 4 | lazy = true, 5 | dependencies = 'rafamadriz/friendly-snippets', 6 | version = '*', 7 | opts = { 8 | appearance = { 9 | use_nvim_cmp_as_default = false, 10 | nerd_font_variant = 'mono', 11 | kind_icons = require('lib.icons').kind, 12 | }, 13 | completion = { 14 | menu = { 15 | border = 'single', 16 | draw = { 17 | components = { 18 | -- customize the drawing of kind icons 19 | kind_icon = { 20 | text = function(ctx) 21 | -- default kind icon 22 | local icon = ctx.kind_icon 23 | -- if LSP source, check for color derived from documentation 24 | if ctx.item.source_name == 'LSP' then 25 | local color_item = require('nvim-highlight-colors').format( 26 | ctx.item.documentation, 27 | { kind = ctx.kind } 28 | ) 29 | if color_item and color_item.abbr then 30 | icon = color_item.abbr 31 | end 32 | end 33 | return icon .. ctx.icon_gap 34 | end, 35 | highlight = function(ctx) 36 | -- default highlight group 37 | local highlight = 'BlinkCmpKind' .. ctx.kind 38 | -- if LSP source, check for color derived from documentation 39 | if ctx.item.source_name == 'LSP' then 40 | local color_item = require('nvim-highlight-colors').format( 41 | ctx.item.documentation, 42 | { kind = ctx.kind } 43 | ) 44 | if color_item and color_item.abbr_hl_group then 45 | highlight = color_item.abbr_hl_group 46 | end 47 | end 48 | return highlight 49 | end, 50 | }, 51 | }, 52 | }, 53 | }, 54 | documentation = { 55 | auto_show = true, 56 | auto_show_delay_ms = 250, 57 | window = { border = 'single' }, 58 | }, 59 | accept = { 60 | auto_brackets = { 61 | enabled = true, 62 | }, 63 | }, 64 | ghost_text = { 65 | enabled = true, 66 | }, 67 | }, 68 | signature = { 69 | enabled = true, 70 | window = { 71 | border = 'single', 72 | }, 73 | }, 74 | keymap = { 75 | [''] = { 'show', 'show_documentation', 'hide_documentation' }, 76 | [''] = { 'hide', 'fallback' }, 77 | [''] = { 'accept', 'fallback' }, 78 | [''] = { 'select_prev', 'fallback' }, 79 | [''] = { 'select_next', 'fallback' }, 80 | [''] = { 'select_prev', 'fallback' }, 81 | [''] = { 'select_next', 'fallback' }, 82 | [''] = { 83 | function(cmp) 84 | if cmp.snippet_active() then 85 | return cmp.accept() 86 | else 87 | return cmp.select_and_accept() 88 | end 89 | end, 90 | 'snippet_forward', 91 | 'fallback', 92 | }, 93 | [''] = { 'snippet_backward', 'fallback' }, 94 | [''] = { 95 | function(cmp) 96 | if cmp.snippet_active() then 97 | return cmp.accept() 98 | else 99 | return cmp.select_and_accept() 100 | end 101 | end, 102 | 'snippet_forward', 103 | 'fallback', 104 | }, 105 | [''] = { 'snippet_backward', 'fallback' }, 106 | 107 | [''] = { 'scroll_documentation_up', 'fallback' }, 108 | [''] = { 'scroll_documentation_down', 'fallback' }, 109 | [''] = { 'scroll_documentation_up', 'fallback' }, 110 | [''] = { 'scroll_documentation_down', 'fallback' }, 111 | [''] = { 'show_signature', 'hide_signature', 'fallback' }, 112 | }, 113 | sources = { 114 | default = { 'lazydev', 'lsp', 'path', 'snippets', 'buffer' }, 115 | providers = { 116 | lsp = { 117 | min_keyword_length = 0, 118 | score_offset = 0, 119 | }, 120 | path = { 121 | min_keyword_length = 0, 122 | opts = { 123 | trailing_slash = true, 124 | label_trailing_slash = true, 125 | get_cwd = function(context) 126 | return vim.fn.expand(('#%d:p:h'):format(context.bufnr)) 127 | end, 128 | show_hidden_files_by_default = true, 129 | }, 130 | }, 131 | snippets = { 132 | min_keyword_length = 0, 133 | }, 134 | buffer = { 135 | min_keyword_length = 2, 136 | max_items = 5, 137 | }, 138 | lazydev = { 139 | name = 'LazyDev', 140 | module = 'lazydev.integrations.blink', 141 | score_offset = 100, 142 | }, 143 | }, 144 | }, 145 | cmdline = { 146 | keymap = { 147 | [''] = { 148 | function(cmp) 149 | if cmp.is_ghost_text_visible() and not cmp.is_menu_visible() then 150 | return cmp.accept() 151 | end 152 | end, 153 | 'show_and_insert', 154 | 'select_next', 155 | }, 156 | [''] = { 'show_and_insert', 'select_prev' }, 157 | [''] = { 'accept_and_enter', 'fallback' }, 158 | }, 159 | completion = { 160 | list = { 161 | selection = { 162 | preselect = false, 163 | auto_insert = true, 164 | }, 165 | }, 166 | menu = { 167 | auto_show = true, 168 | }, 169 | ghost_text = { enabled = true }, 170 | }, 171 | }, 172 | }, 173 | opts_extend = { 'sources.default' }, 174 | } 175 | -------------------------------------------------------------------------------- /lua/plugins/bufferline.lua: -------------------------------------------------------------------------------- 1 | return { 2 | 'akinsho/bufferline.nvim', 3 | enabled = true, 4 | event = 'VeryLazy', 5 | version = '*', 6 | config = function() 7 | require('bufferline').setup({ 8 | options = { 9 | indicator = { 10 | -- icon = '▎', 11 | style = 'underline', -- 'icon' | 'underline' | 'none' 12 | }, 13 | tab_size = 20, 14 | diagnostics = 'nvim_lsp', 15 | diagnostics_indicator = function(count, level, diagnostics_dict, context) 16 | local ret = (diagnostics_dict.error and ' ' .. diagnostics_dict.error .. ' ' or '') 17 | .. (diagnostics_dict.warning and ' ' .. diagnostics_dict.warning or '') 18 | .. (diagnostics_dict.hint and '  ' .. diagnostics_dict.hint .. ' ' or '') 19 | return vim.trim(ret) 20 | end, 21 | ---@type 'thin' | 'thick' | 'slant' | 'padded_slant' | 'slope' | 'padded_slope' 22 | separator_style = 'thin', 23 | groups = { 24 | options = { 25 | toggle_hidden_on_enter = true, 26 | }, 27 | items = { 28 | require('bufferline.groups').builtin.pinned:with({ icon = '' }), 29 | }, 30 | }, 31 | }, 32 | highlights = require('catppuccin.groups.integrations.bufferline').get(), 33 | }) 34 | end, 35 | } 36 | -------------------------------------------------------------------------------- /lua/plugins/ccc.lua: -------------------------------------------------------------------------------- 1 | return { 2 | 'uga-rosa/ccc.nvim', 3 | keys = { 4 | { 'cc', 'CccPick', desc = 'Color Picker' }, 5 | }, 6 | opts = { 7 | win_opts = { 8 | border = 'single', 9 | }, 10 | }, 11 | } 12 | -------------------------------------------------------------------------------- /lua/plugins/cheatsheet.lua: -------------------------------------------------------------------------------- 1 | return { 2 | 'sudormrfbin/cheatsheet.nvim', 3 | enabled = false, 4 | keys = { 5 | { 'cs', 'Cheatsheet', desc = 'Cheatsheet' }, 6 | { 'ce', 'CheatsheetEdit', desc = 'Cheatsheet Edit' }, 7 | }, 8 | dependencies = { 9 | { 'nvim-telescope/telescope.nvim' }, 10 | { 'nvim-lua/popup.nvim' }, 11 | { 'nvim-lua/plenary.nvim' }, 12 | }, 13 | opts = { 14 | bundled_plugin_cheatsheets = { 15 | disabled = { 'gitsigns.nvim' }, 16 | }, 17 | }, 18 | } 19 | -------------------------------------------------------------------------------- /lua/plugins/cinnamon.lua: -------------------------------------------------------------------------------- 1 | return { 2 | 'declancm/cinnamon.nvim', 3 | enabled = false, 4 | event = 'VeryLazy', 5 | version = '*', 6 | opts = { 7 | keymaps = { 8 | basic = true, 9 | extra = true, 10 | }, 11 | }, 12 | } 13 | -------------------------------------------------------------------------------- /lua/plugins/cmp.lua: -------------------------------------------------------------------------------- 1 | -- ╭─────────────────────────────────────────────────────────╮ 2 | -- │ CMP CONFIGURATION │ 3 | -- ╰─────────────────────────────────────────────────────────╯ 4 | return { 5 | 'hrsh7th/nvim-cmp', 6 | enabled = false, 7 | event = { 'InsertEnter', 'CmdlineEnter' }, 8 | dependencies = { 9 | 'hrsh7th/cmp-nvim-lsp', 10 | 'hrsh7th/cmp-cmdline', 11 | 'hrsh7th/cmp-buffer', 12 | 'saadparwaiz1/cmp_luasnip', 13 | 'ray-x/cmp-treesitter', 14 | 'hrsh7th/cmp-nvim-lsp-signature-help', 15 | 'hrsh7th/cmp-nvim-lua', 16 | 'hrsh7th/cmp-path', 17 | 'octaltree/cmp-look', 18 | -- 'chrisgrieser/cmp_yanky', 19 | }, 20 | config = function() 21 | -- ╭───────────────╮ 22 | -- │ LOAD SNIPPETS │ 23 | -- ╰───────────────╯ 24 | require('luasnip/loaders/from_lua').load({ paths = { '~/.config/nvim/snippets/' } }) 25 | require('luasnip/loaders/from_vscode').lazy_load() 26 | 27 | -- ╭────────────────╮ 28 | -- │ COMPLETEOPTION │ 29 | -- ╰────────────────╯ 30 | vim.opt.completeopt = { 'menu', 'menuone', 'noselect' } 31 | 32 | -- ╭────────────╮ 33 | -- │ KIND ICONS │ 34 | -- ╰────────────╯ 35 | local kind_icons = { 36 | Class = ' ', 37 | Color = ' ', 38 | Comment = '//', 39 | Constant = ' ', 40 | Constructor = ' ', 41 | Enum = ' ', 42 | EnumMember = ' ', 43 | Event = '', 44 | Field = '󰄶 ', 45 | File = ' ', 46 | Folder = ' ', 47 | Function = 'ƒ ', 48 | Interface = ' ', 49 | Keyword = '󰌆 ', 50 | Method = ' ', 51 | Module = '󰏗 ', 52 | Operator = '󰆕 ', 53 | Property = ' ', 54 | Reference = ' ', 55 | Snippet = ' ', 56 | String = '󱌯 ', 57 | Struct = ' ', 58 | Text = ' ', 59 | TypeParameter = '󰅲 ', 60 | Unit = ' ', 61 | Value = '󰎠 ', 62 | Variable = '󰀫', 63 | } 64 | 65 | -- ╭──────────────╮ 66 | -- │ LOAD LUASNIP │ 67 | -- ╰──────────────╯ 68 | local luasnip = require('luasnip') 69 | 70 | -- ╭──────────╮ 71 | -- │ LOAD CMP │ 72 | -- ╰──────────╯ 73 | local cmp = require('cmp') 74 | 75 | -- ╭───────────╮ 76 | -- │ CMP SETUP │ 77 | -- ╰───────────╯ 78 | cmp.setup({ 79 | snippet = { 80 | expand = function(args) 81 | require('luasnip').lsp_expand(args.body) 82 | end, 83 | }, 84 | window = { 85 | completion = { 86 | border = { '┌', '─', '┐', '│', '┘', '─', '└', '│' }, 87 | winhighlight = 'Normal:CmpPmenu,FloatBorder:FloatBorder,CursorLine:PmenuSel,Search:None', 88 | }, 89 | documentation = { 90 | border = { '┌', '─', '┐', '│', '┘', '─', '└', '│' }, 91 | winhighlight = 'Normal:CmpPmenu,FloatBorder:FloatBorder,CursorLine:PmenuSel,Search:None', 92 | }, 93 | }, 94 | view = { 95 | entries = { 96 | name = 'custom', 97 | selection_order = 'near_cursor', 98 | follow_cursor = true, 99 | }, 100 | }, 101 | mapping = cmp.mapping.preset.insert({ 102 | -- [''] = cmp.mapping(cmp.mapping.select_next_item(), { 'i', 'c' }), 103 | -- [''] = cmp.mapping(cmp.mapping.select_prev_item(), { 'i', 'c' }), 104 | -- [''] = cmp.mapping(cmp.mapping.scroll_docs(-4), { 'i', 'c' }), 105 | -- [''] = cmp.mapping(cmp.mapping.scroll_docs(4), { 'i', 'c' }), 106 | -- [''] = cmp.mapping(cmp.mapping.complete(), { 'i', 'c' }), 107 | [''] = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Insert }), 108 | [''] = cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Insert }), 109 | [''] = cmp.mapping.scroll_docs(-4), 110 | [''] = cmp.mapping.scroll_docs(4), 111 | [''] = cmp.mapping.complete(), 112 | [''] = cmp.config.disable, -- Specify `cmp.config.disable` if you want to remove the default `` mapping. 113 | [''] = cmp.mapping({ 114 | i = cmp.mapping.abort(), 115 | c = cmp.mapping.close(), 116 | }), 117 | [''] = cmp.mapping.confirm({ 118 | behavior = cmp.ConfirmBehavior.Insert, 119 | select = true, 120 | }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items. 121 | -- [''] = cmp.mapping(function(fallback) 122 | -- if cmp.visible() then 123 | -- if luasnip.expandable() then 124 | -- luasnip.expand() 125 | -- else 126 | -- cmp.confirm({ 127 | -- select = true, 128 | -- }) 129 | -- end 130 | -- else 131 | -- fallback() 132 | -- end 133 | -- end), 134 | [''] = cmp.mapping.confirm({ 135 | behavior = cmp.ConfirmBehavior.Replace, 136 | select = true, 137 | }), 138 | [''] = cmp.mapping(function(fallback) 139 | if cmp.visible() then 140 | cmp.select_next_item() 141 | elseif luasnip.locally_jumpable(1) then 142 | luasnip.jump(1) 143 | else 144 | fallback() 145 | end 146 | end, { 'i', 's' }), 147 | [''] = cmp.mapping(function(fallback) 148 | if cmp.visible() then 149 | cmp.select_prev_item() 150 | elseif luasnip.locally_jumpable(-1) then 151 | luasnip.jump(-1) 152 | else 153 | fallback() 154 | end 155 | end, { 'i', 's' }), 156 | }), 157 | sources = cmp.config.sources({ 158 | { name = 'nvim_lsp' }, 159 | { name = 'nvim_lsp_signature_help' }, 160 | { name = 'luasnip' }, 161 | { name = 'buffer' }, 162 | { name = 'path' }, 163 | -- { name = 'cmp_yanky' }, 164 | { name = 'nvim_lua' }, 165 | { name = 'treesitter' }, 166 | { 167 | name = 'look', 168 | keyword_length = 3, 169 | option = { 170 | convert_case = true, 171 | loud = true, 172 | }, 173 | max_item_count = 5, 174 | }, 175 | }), 176 | formatting = { 177 | fields = { 'abbr', 'kind', 'menu' }, 178 | format = function(entry, vim_item) 179 | -- Kind icons 180 | -- This concatonates the icons with the name of the item kind 181 | vim_item.kind = string.format('%s %s', kind_icons[vim_item.kind], vim_item.kind) 182 | -- Trim text function 183 | function trim(text) 184 | local max = 40 185 | if text and text:len(1, max) > max then 186 | text = text:sub(1, max) .. '...' 187 | end 188 | return text 189 | end 190 | vim_item.abbr = trim(vim_item.abbr) 191 | -- Source 192 | vim_item.menu = ({ 193 | nvim_lsp = '( LSP )', 194 | nvim_lsp_signature_help = '( Signature )', 195 | luasnip = '( LuaSnip )', 196 | buffer = '( Buffer )', 197 | -- cmp_yanky = '( Yanky )', 198 | path = '( Path )', 199 | nvim_lua = '( Lua )', 200 | treesitter = '( Treesitter )', 201 | look = '( Look )', 202 | -- cmdline = '(CMDLine)', 203 | })[entry.source.name] 204 | return vim_item 205 | end, 206 | }, 207 | sorting = { 208 | comparators = { 209 | cmp.config.compare.score, 210 | cmp.config.compare.offset, 211 | cmp.config.compare.exact, 212 | cmp.config.compare.recently_used, 213 | cmp.config.compare.length, 214 | cmp.config.compare.locality, 215 | cmp.config.compare.kind, 216 | cmp.config.compare.sort_text, 217 | cmp.config.compare.order, 218 | }, 219 | }, 220 | experimental = { 221 | ghost_text = true, 222 | }, 223 | }) 224 | 225 | -- ╭─────────────────────────╮ 226 | -- │ CMP CMDLINE FOR / AND ? │ 227 | -- ╰─────────────────────────╯ 228 | cmp.setup.cmdline({ '/', '?' }, { 229 | mapping = cmp.mapping.preset.cmdline(), 230 | sources = { 231 | { name = 'buffer' }, 232 | }, 233 | }) 234 | 235 | -- ╭───────────────────╮ 236 | -- │ CMP CMDLINE FOR : │ 237 | -- ╰───────────────────╯ 238 | cmp.setup.cmdline(':', { 239 | mapping = cmp.mapping.preset.cmdline(), 240 | -- sources = cmp.config.sources({ 241 | -- { name = 'path' }, 242 | -- }, { 243 | -- { name = 'cmdline' }, 244 | -- }), 245 | -- Same as above 246 | sources = cmp.config.sources({ 247 | { name = 'path', group_index = 1 }, 248 | { name = 'cmdline', group_index = 2 }, 249 | }), 250 | matching = { disallow_symbol_nonprefix_matching = false }, 251 | }) 252 | 253 | -- ╭───────────────────╮ 254 | -- │ ULTIMATE-AUTOPAIR │ 255 | -- ╰───────────────────╯ 256 | -- local Kind = cmp.lsp.CompletionItemKind 257 | -- cmp.event:on('confirm_done', function(evt) 258 | -- if vim.tbl_contains({ Kind.Function, Kind.Method }, evt.entry:get_completion_item().kind) then 259 | -- vim.api.nvim_feedkeys('()' .. vim.api.nvim_replace_termcodes('', true, true, true), 'n', false) 260 | -- end 261 | -- end) 262 | 263 | -- ╭────────────────╮ 264 | -- │ NVIM-AUTOPAIRS │ 265 | -- ╰────────────────╯ 266 | local cmp_autopairs = require('nvim-autopairs.completion.cmp') 267 | local ts_utils = require('nvim-treesitter.ts_utils') 268 | 269 | local ts_node_func_parens_disabled = { 270 | -- ecma 271 | named_imports = true, 272 | -- rust 273 | use_declaration = true, 274 | } 275 | 276 | local default_handler = cmp_autopairs.filetypes['*']['('].handler 277 | cmp_autopairs.filetypes['*']['('].handler = function(char, item, bufnr, rules, commit_character) 278 | local node_type = ts_utils.get_node_at_cursor():type() 279 | if ts_node_func_parens_disabled[node_type] then 280 | if item.data then 281 | item.data.funcParensDisabled = true 282 | else 283 | char = '' 284 | end 285 | end 286 | default_handler(char, item, bufnr, rules, commit_character) 287 | end 288 | 289 | cmp.event:on('confirm_done', cmp_autopairs.on_confirm_done()) 290 | end, 291 | } 292 | -------------------------------------------------------------------------------- /lua/plugins/codesnap.lua: -------------------------------------------------------------------------------- 1 | return { 2 | 'mistricky/codesnap.nvim', 3 | build = 'make', 4 | cmd = { 'CodeSnap', 'CodeSnapSave', 'CodeSnapASCII' }, 5 | opts = { 6 | save_path = '~/Desktop', 7 | has_breadcrumbs = true, 8 | bg_padding = 0, 9 | watermark = '', 10 | }, 11 | } 12 | -------------------------------------------------------------------------------- /lua/plugins/codewindow.lua: -------------------------------------------------------------------------------- 1 | return { 2 | 'gorbit99/codewindow.nvim', 3 | enabled = true, 4 | keys = { 5 | { 'mm' }, 6 | { 'mc' }, 7 | { 'mf' }, 8 | { 'mo' }, 9 | }, 10 | config = function() 11 | local codewindow = require('codewindow') 12 | codewindow.setup({ 13 | z_index = 20, 14 | }) 15 | codewindow.apply_default_keybinds() 16 | vim.api.nvim_set_hl(0, 'CodewindowBorder', { link = 'FloatBorder' }) 17 | end, 18 | } 19 | -------------------------------------------------------------------------------- /lua/plugins/colorful-winsep.lua: -------------------------------------------------------------------------------- 1 | return { 2 | 'nvim-zh/colorful-winsep.nvim', 3 | enabled = true, 4 | event = { 'BufReadPre', 'BufNewFile' }, 5 | opts = { 6 | only_line_seq = false, 7 | }, 8 | } 9 | -------------------------------------------------------------------------------- /lua/plugins/comments.lua: -------------------------------------------------------------------------------- 1 | return { 2 | -- ╭─────────────────────────────────────────────────────────╮ 3 | -- │ COMMENT.NVIM │ 4 | -- ╰─────────────────────────────────────────────────────────╯ 5 | { 6 | 'numToStr/Comment.nvim', 7 | event = { 'BufReadPre', 'BufNewFile' }, 8 | keys = { 9 | { 'gc', mode = 'v' }, 10 | { 'gb', mode = 'v' }, 11 | { 'gcc' }, 12 | { 'gbc' }, 13 | { 'gco' }, 14 | { 'gcO' }, 15 | { 'gcA' }, 16 | }, 17 | dependencies = { 18 | { 19 | 'JoosepAlviste/nvim-ts-context-commentstring', 20 | config = function() 21 | require('ts_context_commentstring').setup({ 22 | enable_autocmd = false, 23 | }) 24 | end, 25 | }, 26 | }, 27 | config = function() 28 | require('Comment').setup({ 29 | pre_hook = require('ts_context_commentstring.integrations.comment_nvim').create_pre_hook(), 30 | -- pre_hook = function() 31 | -- return vim.bo.commentstring 32 | -- end, 33 | }) 34 | end, 35 | }, 36 | 37 | -- ╭─────────────────────────────────────────────────────────╮ 38 | -- │ TODO-COMMENTS.NVIM │ 39 | -- ╰─────────────────────────────────────────────────────────╯ 40 | { 41 | 'folke/todo-comments.nvim', 42 | event = { 'BufReadPre', 'BufNewFile' }, 43 | keys = { 44 | { 'tq', 'TodoQuickFix', desc = 'Todo QuickFix' }, 45 | { 'tl', 'TodoLocList', desc = 'Todo LocList' }, 46 | { 'ts', 'TodoTelescope', desc = 'Todo Telescope' }, 47 | }, 48 | dependencies = { 'nvim-lua/plenary.nvim' }, 49 | opts = {}, 50 | }, 51 | 52 | -- ╭─────────────────────────────────────────────────────────╮ 53 | -- │ COMMENT-BOX.NVIM │ 54 | -- ╰─────────────────────────────────────────────────────────╯ 55 | { 56 | 'LudoPinelli/comment-box.nvim', 57 | cmd = { 'CBcatalog', 'CBcbox' }, 58 | keys = { 59 | { 'cb', 'CBlcbox', desc = 'Comment Box Big' }, 60 | { 'cd', 'CBd', desc = 'Comment Box Delete' }, 61 | { 'ca', 'CBalbox', desc = 'Comment Box Auto' }, 62 | { 'cl', 'CBcatalog', desc = 'Comment Box Catalog' }, 63 | { 'cy', 'CBy', desc = 'Comment Box Yank Comment' }, 64 | }, 65 | opts = { 66 | line_width = 60, 67 | }, 68 | }, 69 | 70 | -- ╭─────────────────────────────────────────────────────────╮ 71 | -- │ NVIM-COMMENT-FRAME │ 72 | -- ╰─────────────────────────────────────────────────────────╯ 73 | { 74 | 's1n7ax/nvim-comment-frame', 75 | enabled = true, 76 | keys = { 77 | { 'cf', desc = 'Single Comment Frame' }, 78 | { 'cm', desc = 'Multi Comment Frame' }, 79 | }, 80 | dependencies = 'nvim-treesitter', 81 | config = true, 82 | }, 83 | } 84 | -------------------------------------------------------------------------------- /lua/plugins/conform.lua: -------------------------------------------------------------------------------- 1 | return { 2 | 'stevearc/conform.nvim', 3 | event = { 'BufReadPre', 'BufNewFile' }, 4 | opts = { 5 | formatters_by_ft = { 6 | css = { 'prettier' }, 7 | html = { 'prettier' }, 8 | javascript = { 'prettier' }, 9 | json = { 'prettier' }, 10 | tex = { 'latexindent' }, 11 | lua = { 'stylua' }, 12 | markdown = { 'prettier' }, 13 | php = { 'prettier' }, 14 | python = { 'black' }, 15 | rust = { 'rustfmt' }, 16 | scss = { 'prettier' }, 17 | vue = { 'prettier' }, 18 | yaml = { 'yamlfmt' }, 19 | }, 20 | format_on_save = { 21 | lsp_format = 'fallback', 22 | async = false, 23 | timeout_ms = 500, 24 | }, 25 | -- formatters = { 26 | -- latexindent = { 27 | -- prepend_args = { '-l', '/Users/ilias/.indentconfig.yaml' }, 28 | -- }, 29 | -- }, 30 | }, 31 | } 32 | -------------------------------------------------------------------------------- /lua/plugins/csvview.lua: -------------------------------------------------------------------------------- 1 | return { 2 | 'hat0uma/csvview.nvim', 3 | cmd = { 'CsvViewEnable', 'CsvViewDisable', 'CsvViewToggle' }, 4 | opts = { 5 | parser = { comments = { '#', '//' } }, 6 | keymaps = { 7 | textobject_field_inner = { 'if', mode = { 'o', 'x' } }, 8 | textobject_field_outer = { 'af', mode = { 'o', 'x' } }, 9 | -- Excel-like navigation: 10 | -- Use and to move horizontally between fields. 11 | -- Use and to move vertically between rows and place the cursor at the end of the field. 12 | -- Note: In terminals, you may need to enable CSI-u mode to use and . 13 | jump_next_field_end = { '', mode = { 'n', 'v' } }, 14 | jump_prev_field_end = { '', mode = { 'n', 'v' } }, 15 | jump_next_row = { '', mode = { 'n', 'v' } }, 16 | jump_prev_row = { '', mode = { 'n', 'v' } }, 17 | }, 18 | }, 19 | } 20 | -------------------------------------------------------------------------------- /lua/plugins/dap/debug_adapter.lua: -------------------------------------------------------------------------------- 1 | local dap = require('dap') 2 | 3 | -- Signs 4 | local sign = vim.fn.sign_define 5 | --  6 | sign('DapBreakpoint', { text = ' ', texthl = 'DapBreakpoint', linehl = '', numhl = '' }) 7 | sign('DapBreakpointCondition', { text = '●', texthl = 'DapBreakpointCondition', linehl = '', numhl = '' }) 8 | sign('DapLogPoint', { text = '◆', texthl = 'DapLogPoint', linehl = '', numhl = '' }) 9 | 10 | -- ╭──────────────────────────────────────────────────────────╮ 11 | -- │ PYTHON │ 12 | -- ╰──────────────────────────────────────────────────────────╯ 13 | dap.adapters.python = function(cb, config) 14 | if config.request == 'attach' then 15 | ---@diagnostic disable-next-line: undefined-field 16 | local port = (config.connect or config).port 17 | ---@diagnostic disable-next-line: undefined-field 18 | local host = (config.connect or config).host or '127.0.0.1' 19 | cb({ 20 | type = 'server', 21 | port = assert(port, '`connect.port` is required for a python `attach` configuration'), 22 | host = host, 23 | options = { 24 | source_filetype = 'python', 25 | }, 26 | }) 27 | else 28 | cb({ 29 | type = 'executable', 30 | command = '/Users/ilias/.virtualenvs/debugpy/bin/python3', 31 | args = { '-m', 'debugpy.adapter' }, 32 | options = { 33 | source_filetype = 'python', 34 | }, 35 | }) 36 | end 37 | end 38 | dap.configurations.python = { 39 | { 40 | -- The first three options are required by nvim-dap 41 | type = 'python', -- the type here established the link to the adapter definition: `dap.adapters.python` 42 | request = 'launch', 43 | name = 'Launch file', 44 | 45 | -- Options below are for debugpy, see https://github.com/microsoft/debugpy/wiki/Debug-configuration-settings for supported options 46 | 47 | program = '${file}', -- This configuration will launch the current file if used. 48 | pythonPath = function() 49 | -- debugpy supports launching an application with a different interpreter then the one used to launch debugpy itself. 50 | -- The code below looks for a `venv` or `.venv` folder in the current directly and uses the python within. 51 | -- You could adapt this - to for example use the `VIRTUAL_ENV` environment variable. 52 | local cwd = vim.fn.getcwd() 53 | if vim.fn.executable(cwd .. '/Users/ilias/.virtualenvs/debugpy/bin/python3') == 1 then 54 | return cwd .. '/Users/ilias/.virtualenvs/debugpy/bin/python3' 55 | elseif vim.fn.executable(cwd .. '/Users/ilias/.virtualenvs/debugpy/bin/python3') == 1 then 56 | return cwd .. '/Users/ilias/.virtualenvs/debugpy/bin/python3' 57 | else 58 | return '/Users/ilias/.virtualenvs/debugpy/bin/python3' 59 | end 60 | end, 61 | }, 62 | } 63 | -- ╭──────────────────────────────────────────────────────────╮ 64 | -- │ RUST │ 65 | -- ╰──────────────────────────────────────────────────────────╯ 66 | dap.adapters.lldb = { 67 | type = 'executable', 68 | command = '/opt/homebrew/opt/llvm/bin/lldb-vscode', -- adjust as needed, must be absolute path 69 | name = 'lldb', 70 | } 71 | dap.configurations.rust = { 72 | { 73 | name = 'Launch', 74 | type = 'lldb', 75 | request = 'launch', 76 | program = function() 77 | return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/target/debug/' .. 'file') 78 | end, 79 | cwd = '${workspaceFolder}', 80 | stopOnEntry = false, 81 | args = {}, 82 | 83 | -- 💀 84 | -- if you change `runInTerminal` to true, you might need to change the yama/ptrace_scope setting: 85 | -- 86 | -- echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope 87 | -- 88 | -- Otherwise you might get the following error: 89 | -- 90 | -- Error on launch: Failed to attach to the target process 91 | -- 92 | -- But you should be aware of the implications: 93 | -- https://www.kernel.org/doc/html/latest/admin-guide/LSM/Yama.html 94 | -- runInTerminal = false, 95 | showDisassembly = 'never', 96 | -- vim.fn.jobstart('cargo build'), 97 | }, 98 | } 99 | -- ╭──────────────────────────────────────────────────────────╮ 100 | -- │ JAVASCRIPT │ 101 | -- ╰──────────────────────────────────────────────────────────╯ 102 | dap.adapters['pwa-node'] = { 103 | type = 'server', 104 | host = 'localhost', 105 | port = '${port}', 106 | executable = { 107 | command = 'node', 108 | args = { '/Users/ilias/.config/js-debug/src/dapDebugServer.js', '${port}' }, 109 | }, 110 | } 111 | dap.configurations.javascript = { 112 | { 113 | type = 'pwa-node', 114 | request = 'launch', 115 | name = 'Launch file', 116 | program = '${file}', 117 | cwd = '${workspaceFolder}', 118 | }, 119 | } 120 | -------------------------------------------------------------------------------- /lua/plugins/dashboard.lua: -------------------------------------------------------------------------------- 1 | return { 2 | 'nvimdev/dashboard-nvim', 3 | event = 'VimEnter', 4 | opts = { 5 | theme = 'doom', 6 | config = { 7 | header = { 8 | 'Neovim', 9 | '', 10 | }, 11 | -- header = { 12 | -- '', 13 | -- '', 14 | -- '', 15 | -- ' ███╗ ██╗ ███████╗ ██████╗ ██╗ ██╗ ██╗ ███╗ ███╗', 16 | -- ' ████╗ ██║ ██╔════╝██╔═══██╗ ██║ ██║ ██║ ████╗ ████║', 17 | -- ' ██╔██╗ ██║ █████╗ ██║ ██║ ██║ ██║ ██║ ██╔████╔██║', 18 | -- ' ██║╚██╗██║ ██╔══╝ ██║ ██║ ╚██╗ ██╔╝ ██║ ██║╚██╔╝██║', 19 | -- ' ██║ ╚████║ ███████╗╚██████╔╝ ╚████╔╝ ██║ ██║ ╚═╝ ██║', 20 | -- ' ╚═╝ ╚═══╝ ╚══════╝ ╚═════╝ ╚═══╝ ╚═╝ ╚═╝ ╚═╝', 21 | -- '', 22 | -- }, 23 | center = { 24 | { action = 'Telescope find_files', desc = ' Find file', icon = ' ', key = 'f' }, 25 | { action = 'enew | startinsert', desc = ' New file', icon = '󰝒 ', key = 'n' }, 26 | { action = 'Telescope file_browser', desc = ' File explorer', icon = ' ', key = 'e' }, 27 | { action = 'Telescope live_grep', desc = ' Find text', icon = ' ', key = 't' }, 28 | { action = 'Neogit', desc = ' Git', icon = ' ', key = 'g' }, 29 | { action = 'Telescope oldfiles', desc = ' Recent files', icon = ' ', key = 'r' }, 30 | -- { action = 'e lua/plugins/init.lua', desc = ' Config', icon = ' ', key = 'c' }, 31 | { action = 'Lazy', desc = ' Lazy', icon = '💤', key = 'l' }, 32 | { action = 'qa', desc = ' Quit', icon = ' ', key = 'q' }, 33 | }, 34 | footer = function() 35 | local stats = require('lazy').stats() 36 | local ms = (math.floor(stats.startuptime * 100 + 0.5) / 100) 37 | return { '⚡ Neovim loaded ' .. stats.loaded .. '/' .. stats.count .. ' plugins in ' .. ms .. 'ms' } 38 | end, 39 | }, 40 | hide = { 41 | tabline = false, 42 | }, 43 | }, 44 | } 45 | -------------------------------------------------------------------------------- /lua/plugins/dressing.lua: -------------------------------------------------------------------------------- 1 | return { 2 | 'stevearc/dressing.nvim', 3 | enabled = true, 4 | lazy = true, 5 | init = function() 6 | ---@diagnostic disable-next-line: duplicate-set-field 7 | vim.ui.select = function(...) 8 | require('lazy').load({ plugins = { 'dressing.nvim' } }) 9 | return vim.ui.select(...) 10 | end 11 | ---@diagnostic disable-next-line: duplicate-set-field 12 | vim.ui.input = function(...) 13 | require('lazy').load({ plugins = { 'dressing.nvim' } }) 14 | return vim.ui.input(...) 15 | end 16 | end, 17 | opts = {}, 18 | } 19 | -------------------------------------------------------------------------------- /lua/plugins/easytables.lua: -------------------------------------------------------------------------------- 1 | return { 2 | 'Myzel394/easytables.nvim', 3 | ft = 'markdown', 4 | config = true, 5 | } 6 | -------------------------------------------------------------------------------- /lua/plugins/feline.lua: -------------------------------------------------------------------------------- 1 | return { 2 | 'freddiehaddad/feline.nvim', 3 | enabled = false, 4 | event = 'VeryLazy', 5 | config = function() 6 | local clrs = require('catppuccin.palettes').get_palette() 7 | local ctp_feline = require('catppuccin.groups.integrations.feline') 8 | local U = require('catppuccin.utils.colors') 9 | 10 | ctp_feline.setup({ 11 | assets = { 12 | left_separator = '', 13 | right_separator = '', 14 | mode_icon = '', 15 | dir = '', 16 | file = '󰈙 ', 17 | lsp = { 18 | server = '󰒋 ', 19 | error = '', 20 | warning = '', 21 | info = '', 22 | hint = '󰌵', 23 | }, 24 | git = { 25 | -- icons:    26 | branch = '', 27 | added = '', 28 | changed = '', 29 | removed = '', 30 | }, 31 | }, 32 | sett = { 33 | text = U.vary_color({ latte = clrs.crust, mocha = clrs.crust }, clrs.surface0), 34 | bkg = U.vary_color({ latte = 'NONE', mocha = 'NONE' }, clrs.surface0), 35 | diffs = clrs.mauve, 36 | extras = clrs.overlay2, 37 | curr_file = clrs.maroon, 38 | curr_dir = clrs.flamingo, 39 | show_modified = true, 40 | show_lazy_updates = true, 41 | }, 42 | mode_colors = { 43 | ['n'] = { 'NORMAL', clrs.teal }, 44 | ['no'] = { 'N-PENDING', clrs.lavender }, 45 | ['i'] = { 'INSERT', clrs.green }, 46 | ['ic'] = { 'INSERT', clrs.green }, 47 | ['t'] = { 'TERMINAL', clrs.green }, 48 | ['v'] = { 'VISUAL', clrs.flamingo }, 49 | ['V'] = { 'V-LINE', clrs.flamingo }, 50 | ['^V'] = { 'V-BLOCK', clrs.flamingo }, 51 | ['R'] = { 'REPLACE', clrs.maroon }, 52 | ['Rv'] = { 'V-REPLACE', clrs.maroon }, 53 | ['s'] = { 'SELECT', clrs.maroon }, 54 | ['S'] = { 'S-LINE', clrs.maroon }, 55 | ['^S'] = { 'S-BLOCK', clrs.maroon }, 56 | ['c'] = { 'COMMAND', clrs.peach }, 57 | ['cv'] = { 'COMMAND', clrs.peach }, 58 | ['ce'] = { 'COMMAND', clrs.peach }, 59 | ['r'] = { 'PROMPT', clrs.teal }, 60 | ['rm'] = { 'MORE', clrs.teal }, 61 | ['r?'] = { 'CONFIRM', clrs.mauve }, 62 | ['!'] = { 'SHELL', clrs.green }, 63 | }, 64 | view = { 65 | lsp = { 66 | progress = true, -- if true the status bar will display an lsp progress indicator 67 | name = true, -- if true the status bar will display the lsp servers name, otherwise it will display the text "Lsp" 68 | exclude_lsp_names = {}, -- lsp server names that should not be displayed when name is set to true 69 | separator = '|', -- the separator used when there are multiple lsp servers 70 | }, 71 | }, 72 | }) 73 | 74 | require('feline').setup({ 75 | components = ctp_feline.get(), 76 | force_inactive = { 77 | filetypes = { 78 | '^packer$', 79 | '^NvimTree$', 80 | '^trouble$', 81 | '^Outline$', 82 | '^qf$', 83 | '^help$', 84 | '^TelescopePrompt$', 85 | '^git$', 86 | '^dapui_scopes$', 87 | '^dapui_breakpoints$', 88 | '^dapui_stacks$', 89 | '^dapui_watches$', 90 | '^dapui_repl$', 91 | '^dap%-repl$', 92 | '^dapui_console$', 93 | '^lspinfo$', 94 | '^mason$', 95 | '^lazy$', 96 | '^Codewindow$', 97 | '^JABSwindow$', 98 | '^neo%-tree$', 99 | '^snipe%-menu$', 100 | }, 101 | buftypes = { 102 | 'terminal', 103 | }, 104 | bufnames = {}, 105 | }, 106 | }) 107 | end, 108 | } 109 | -------------------------------------------------------------------------------- /lua/plugins/flash.lua: -------------------------------------------------------------------------------- 1 | return { 2 | 'folke/flash.nvim', 3 | event = { 'BufReadPre', 'BufNewFile' }, 4 | opts = { 5 | label = { 6 | ---@type "lowercase" | "all" 7 | reuse = 'all', 8 | }, 9 | modes = { 10 | search = { 11 | enabled = true, 12 | highlight = { backdrop = true }, 13 | }, 14 | char = { 15 | jump_labels = true, 16 | keys = { 'f', 'F', 't', 'T' }, 17 | char_actions = function(motion) 18 | return { 19 | [','] = 'next', 20 | [';'] = 'prev', 21 | [motion:lower()] = 'next', 22 | [motion:upper()] = 'prev', 23 | } 24 | end, 25 | }, 26 | treesitter = { 27 | highlight = { 28 | backdrop = true, 29 | }, 30 | }, 31 | }, 32 | -- action = function(match, state) 33 | -- require('cinnamon').scroll(function() 34 | -- require('flash.jump').jump(match, state) 35 | -- require('flash.jump').on_jump(state) 36 | -- end) 37 | -- end, 38 | }, 39 | keys = { 40 | { 41 | 's', 42 | mode = { 'n', 'x', 'o' }, 43 | function() 44 | require('flash').jump() 45 | end, 46 | desc = 'Flash', 47 | }, 48 | { 49 | 's', 50 | mode = { 'n', 'o', 'x' }, 51 | function() 52 | require('flash').treesitter() 53 | end, 54 | desc = 'Flash Treesitter', 55 | }, 56 | { 57 | 'r', 58 | mode = 'o', 59 | function() 60 | require('flash').remote() 61 | end, 62 | desc = 'Remote Flash', 63 | }, 64 | { 65 | 'v', 66 | mode = { 'n', 'o', 'x' }, 67 | function() 68 | require('flash').treesitter_search() 69 | end, 70 | desc = 'Treesitter Flash Search', 71 | }, 72 | { 73 | '', 74 | mode = { 'c' }, 75 | function() 76 | require('flash').toggle() 77 | end, 78 | desc = 'Toggle Flash Search', 79 | }, 80 | }, 81 | } 82 | -------------------------------------------------------------------------------- /lua/plugins/focus.lua: -------------------------------------------------------------------------------- 1 | return { 2 | 'nvim-focus/focus.nvim', 3 | enabled = false, 4 | version = false, 5 | keys = { 6 | { 'h', 'FocusSplitLeft', desc = 'Focus Split Left' }, 7 | { 'j', 'FocusSplitDown', desc = 'Focus Split Down' }, 8 | { 'k', 'FocusSplitUp', desc = 'Focus Split Up' }, 9 | { 'l', 'FocusSplitRight', desc = 'Focus Split Right' }, 10 | { 'm', 'FocusMaxOrEqual', desc = 'Maximaze or Equalises Split' }, 11 | }, 12 | init = function() 13 | local ignore_filetypes = { 'neo-tree', 'Trouble' } 14 | local ignore_buftypes = { 'nofile', 'prompt', 'popup' } 15 | 16 | local augroup = vim.api.nvim_create_augroup('FocusDisable', { clear = true }) 17 | 18 | vim.api.nvim_create_autocmd('WinEnter', { 19 | group = augroup, 20 | callback = function(_) 21 | if vim.tbl_contains(ignore_buftypes, vim.bo.buftype) then 22 | vim.w.focus_disable = true 23 | else 24 | vim.w.focus_disable = false 25 | end 26 | end, 27 | desc = 'Disable focus autoresize for BufType', 28 | }) 29 | 30 | vim.api.nvim_create_autocmd('FileType', { 31 | group = augroup, 32 | callback = function(_) 33 | if vim.tbl_contains(ignore_filetypes, vim.bo.filetype) then 34 | vim.w.focus_disable = true 35 | else 36 | vim.w.focus_disable = false 37 | end 38 | end, 39 | desc = 'Disable focus autoresize for FileType', 40 | }) 41 | end, 42 | opts = { 43 | autoresize = { 44 | enable = false, 45 | }, 46 | ui = { 47 | number = false, 48 | relativenumber = false, 49 | hybridnumber = false, 50 | signcolumn = false, 51 | }, 52 | -- excluded_filetypes = { 53 | -- 'toggleterm', 54 | -- 'qf', 55 | -- 'help', 56 | -- 'NvimTree', 57 | -- 'Trouble', 58 | -- 'tsplayground', 59 | -- 'Outline', 60 | -- }, 61 | }, 62 | } 63 | -------------------------------------------------------------------------------- /lua/plugins/fzf-lua.lua: -------------------------------------------------------------------------------- 1 | return { 2 | 'ibhagwan/fzf-lua', 3 | enabled = false, 4 | keys = { 5 | { '', "lua require('fzf-lua').files()", desc = 'FZF Files' }, 6 | }, 7 | opts = { 8 | winopts = { 9 | border = 'single', 10 | }, 11 | preview = { 12 | hidden = 'hidden', 13 | }, 14 | keymap = { 15 | builtin = { 16 | [''] = 'preview-page-down', 17 | [''] = 'preview-page-up', 18 | [''] = 'preview-page-down', 19 | [''] = 'preview-page-up', 20 | }, 21 | }, 22 | }, 23 | config = true, 24 | } 25 | -------------------------------------------------------------------------------- /lua/plugins/git.lua: -------------------------------------------------------------------------------- 1 | return { 2 | -- ╭──────────────────────────────────────────────────────────╮ 3 | -- │ Diffview │ 4 | -- ╰──────────────────────────────────────────────────────────╯ 5 | { 6 | 'sindrets/diffview.nvim', 7 | cmd = { 'DiffviewOpen', 'DiffviewClose', 'DiffviewToggleFiles', 'DiffviewFocusFiles' }, 8 | dependencies = 'nvim-lua/plenary.nvim', 9 | config = function() 10 | require('diffview').setup() 11 | end, 12 | }, 13 | -- ╭──────────────────────────────────────────────────────────╮ 14 | -- │ Gitsigns │ 15 | -- ╰──────────────────────────────────────────────────────────╯ 16 | { 17 | 'lewis6991/gitsigns.nvim', 18 | event = { 'BufReadPre', 'BufNewFile' }, 19 | dependencies = 'nvim-lua/plenary.nvim', 20 | config = function() 21 | require('gitsigns').setup({ 22 | preview_config = { 23 | border = 'single', 24 | }, 25 | attach_to_untracked = true, 26 | on_attach = function(bufnr) 27 | local gitsigns = require('gitsigns') 28 | 29 | local function map(mode, l, r, opts) 30 | opts = opts or {} 31 | opts.buffer = bufnr 32 | vim.keymap.set(mode, l, r, opts) 33 | end 34 | 35 | -- Navigation 36 | map('n', 'gn', function() 37 | if vim.wo.diff then 38 | vim.cmd.normal({ 'gn', bang = true }) 39 | else 40 | gitsigns.nav_hunk('next') 41 | end 42 | end) 43 | 44 | map('n', 'gN', function() 45 | if vim.wo.diff then 46 | vim.cmd.normal({ 'gN', bang = true }) 47 | else 48 | gitsigns.nav_hunk('prev') 49 | end 50 | end) 51 | 52 | -- Actions 53 | map('n', 'gs', gitsigns.stage_hunk, { desc = 'Gitsigns Stage Hunk' }) 54 | map('n', 'gr', gitsigns.reset_hunk, { desc = 'Gitsigns Reset Hunk' }) 55 | 56 | map('v', 'gs', function() 57 | gitsigns.stage_hunk({ vim.fn.line('.'), vim.fn.line('v') }) 58 | end, { desc = 'Gitsigns Stage Hunk' }) 59 | 60 | map('v', 'gr', function() 61 | gitsigns.reset_hunk({ vim.fn.line('.'), vim.fn.line('v') }) 62 | end, { desc = 'Gitsigns Reset Hunk' }) 63 | 64 | map('n', 'gS', gitsigns.stage_buffer, { desc = 'Gitsigns Stage Buffer' }) 65 | map('n', 'gR', gitsigns.reset_buffer, { desc = 'Gitsigns Reset Buffer' }) 66 | map('n', 'gp', gitsigns.preview_hunk, { desc = 'Gitsigns Preview Hunk' }) 67 | map('n', 'gi', gitsigns.preview_hunk_inline, { desc = 'Gitsigns Preview Hunk Inline' }) 68 | 69 | map('n', 'gB', function() 70 | gitsigns.blame_line({ full = true }) 71 | end, { desc = 'Gitsigns Blame Line Full' }) 72 | 73 | map('n', 'gd', gitsigns.diffthis, { desc = 'Gitsigns Hunk Diffthis' }) 74 | 75 | map('n', 'gD', function() 76 | gitsigns.diffthis('~') 77 | end, { desc = 'Gitsigns Hunk Diffthis' }) 78 | 79 | -- Toggles 80 | map('n', 'gb', gitsigns.toggle_current_line_blame, { desc = 'Gitsigns Current Blame Line' }) 81 | map('n', 'gt', gitsigns.toggle_deleted, { desc = 'Gitsigns Git Toggle deleted lines' }) 82 | map('n', 'gw', gitsigns.toggle_word_diff, { desc = 'Gitsigns Git Toggle word diff' }) 83 | 84 | -- Text object 85 | map({ 'o', 'x' }, 'ih', ':Gitsigns select_hunk') 86 | end, 87 | }) 88 | end, 89 | }, 90 | -- ╭──────────────────────────────────────────────────────────╮ 91 | -- │ Neogit │ 92 | -- ╰──────────────────────────────────────────────────────────╯ 93 | { 94 | 'NeogitOrg/neogit', 95 | cmd = 'Neogit', 96 | keys = { 97 | { 'gg', 'Neogit', desc = 'Neogit' }, 98 | }, 99 | dependencies = { 100 | 'nvim-lua/plenary.nvim', 101 | 'nvim-telescope/telescope.nvim', 102 | 'sindrets/diffview.nvim', 103 | }, 104 | config = true, 105 | opts = { 106 | graph_style = 'kitty', 107 | notification_icon = '', 108 | commit_editor = { 109 | staged_diff_split_kind = 'vsplit', 110 | spell_check = false, 111 | }, 112 | signs = { 113 | item = { '', '' }, 114 | section = { '', '' }, 115 | }, 116 | disable_commit_confirmation = true, 117 | integrations = { 118 | telescope = true, 119 | diffview = true, 120 | }, 121 | }, 122 | }, 123 | -- ╭──────────────────────────────────────────────────────────╮ 124 | -- │ Advance git search │ 125 | -- ╰──────────────────────────────────────────────────────────╯ 126 | { 127 | 'aaronhallaert/advanced-git-search.nvim', 128 | cmd = { 'AdvancedGitSearch' }, 129 | dependencies = { 130 | 'nvim-telescope/telescope.nvim', 131 | }, 132 | }, 133 | } 134 | -------------------------------------------------------------------------------- /lua/plugins/glance.lua: -------------------------------------------------------------------------------- 1 | return { 2 | 'dnlhc/glance.nvim', 3 | keys = { 4 | { 'gr', 'Glance references', desc = 'Glance references' }, 5 | { 'gd', 'Glance definitions', desc = 'Glance definitions' }, 6 | { 'gy', 'Glance type_definitions', desc = 'Glance type_definitions' }, 7 | { 'gm', 'Glance implementations', desc = 'Glance implementations' }, 8 | }, 9 | config = true, 10 | } 11 | -------------------------------------------------------------------------------- /lua/plugins/grug-far.lua: -------------------------------------------------------------------------------- 1 | return { 2 | 'MagicDuck/grug-far.nvim', 3 | cmd = { 'GrugFar' }, 4 | config = function() 5 | require('grug-far').setup({ 6 | windowCreationCommand = 'tabnew %', 7 | }) 8 | end, 9 | } 10 | -------------------------------------------------------------------------------- /lua/plugins/hlchunk.lua: -------------------------------------------------------------------------------- 1 | return { 2 | 'shellRaining/hlchunk.nvim', 3 | enabled = true, 4 | event = { 'BufReadPre', 'BufNewFile' }, 5 | config = function() 6 | require('hlchunk').setup({ 7 | chunk = { 8 | enable = true, 9 | }, 10 | indent = { 11 | enable = true, 12 | }, 13 | }) 14 | end, 15 | } 16 | -------------------------------------------------------------------------------- /lua/plugins/hop.lua: -------------------------------------------------------------------------------- 1 | return { 2 | 'smoka7/hop.nvim', 3 | version = '*', 4 | keys = { 5 | { '', 'HopWord', desc = 'Hop Word' }, 6 | { 'ha', 'HopAnywhere', desc = 'Hop Anywhere' }, 7 | { 'hc', 'HopCamelCase', desc = 'Hop CamelCase' }, 8 | { 'hh', 'HopPattern', desc = 'Hop Pattern' }, 9 | { 'hl', 'HopLine', desc = 'Hop Line' }, 10 | { 'hn', 'HopNodes', desc = 'Hop Nodes' }, 11 | { 'hp', 'HopPasteChar1', desc = 'Hop Paste' }, 12 | { 'hv', 'HopVertical', desc = 'Hop Vertical' }, 13 | { 'hy', 'HopYankChar1', desc = 'Hop Yank' }, 14 | { 'h1', 'HopChar1', desc = 'Hop 1 Char' }, 15 | { 'h2', 'HopChar2', desc = 'Hop 2 Chars' }, 16 | }, 17 | config = true, 18 | } 19 | -------------------------------------------------------------------------------- /lua/plugins/image_preview.lua: -------------------------------------------------------------------------------- 1 | return { 2 | 'adelarsq/image_preview.nvim', 3 | enabled = true, 4 | keys = { 'p' }, 5 | config = function() 6 | require('image_preview').setup() 7 | end, 8 | } 9 | -------------------------------------------------------------------------------- /lua/plugins/inc_rename.lua: -------------------------------------------------------------------------------- 1 | return { 2 | 'smjonas/inc-rename.nvim', 3 | cmd = 'IncRename', 4 | keys = { 5 | { 'ir', ':IncRename ', desc = 'IncRename' }, 6 | }, 7 | opts = {}, 8 | } 9 | -------------------------------------------------------------------------------- /lua/plugins/indent-blankline.lua: -------------------------------------------------------------------------------- 1 | return { 2 | 'lukas-reineke/indent-blankline.nvim', 3 | enabled = true, 4 | event = { 'BufReadPre', 'BufNewFile' }, 5 | main = 'ibl', 6 | opts = { 7 | indent = { 8 | char = '│', 9 | repeat_linebreak = false, 10 | }, 11 | scope = { 12 | enabled = false, 13 | }, 14 | }, 15 | } 16 | -------------------------------------------------------------------------------- /lua/plugins/init.lua: -------------------------------------------------------------------------------- 1 | return { 2 | { 3 | 'catppuccin/nvim', 4 | lazy = false, 5 | name = 'catppuccin', 6 | priority = 1000, 7 | config = function() 8 | require('plugins.theme.catppuccin') 9 | vim.cmd('colorscheme catppuccin') 10 | end, 11 | }, 12 | } 13 | -------------------------------------------------------------------------------- /lua/plugins/lazydev.lua: -------------------------------------------------------------------------------- 1 | return { 2 | { 3 | 'folke/lazydev.nvim', 4 | ft = 'lua', 5 | dependencies = { 6 | { 'justinsgithub/wezterm-types', lazy = true }, 7 | { 'Bilal2453/luvit-meta', lazy = true }, 8 | }, 9 | opts = { 10 | library = { 11 | 'lazy.nvim', 12 | 'luvit-meta/library', 13 | { path = 'wezterm-types', mods = { 'wezterm' } }, 14 | }, 15 | }, 16 | }, 17 | } 18 | -------------------------------------------------------------------------------- /lua/plugins/ltex-extra.lua: -------------------------------------------------------------------------------- 1 | return { 2 | 'barreiroleo/ltex-extra.nvim', 3 | enabled = true, 4 | lazy = true, 5 | config = true, 6 | } 7 | -------------------------------------------------------------------------------- /lua/plugins/lualine.lua: -------------------------------------------------------------------------------- 1 | return { 2 | 'nvim-lualine/lualine.nvim', 3 | event = 'VeryLazy', 4 | config = function() 5 | local function get_colors() 6 | local background = vim.o.background 7 | if background == 'dark' then 8 | return require('catppuccin.palettes').get_palette('mocha') 9 | else 10 | return require('catppuccin.palettes').get_palette('latte') 11 | end 12 | end 13 | 14 | local colors = get_colors() 15 | local icon = require('lib.icons') 16 | 17 | local modecolor = { 18 | n = colors.mauve, 19 | i = colors.sapphire, 20 | v = colors.maroon, 21 | [''] = colors.maroon, 22 | V = colors.lavender, 23 | c = colors.yellow, 24 | no = colors.red, 25 | s = colors.yellow, 26 | S = colors.yellow, 27 | [''] = colors.yellow, 28 | ic = colors.yellow, 29 | R = colors.green, 30 | Rv = colors.maroon, 31 | cv = colors.red, 32 | ce = colors.red, 33 | r = colors.sapphire, 34 | rm = colors.sapphire, 35 | ['r?'] = colors.sapphire, 36 | ['!'] = colors.red, 37 | t = colors.red, 38 | } 39 | 40 | -- ─[ THEME ]──────────────────────────────────────────────── 41 | local theme = { 42 | normal = { 43 | a = { fg = colors.base, bg = colors.blue }, 44 | b = { fg = colors.blue, bg = colors.text }, 45 | c = { fg = colors.text, bg = colors.base }, 46 | z = { fg = colors.text, bg = colors.base }, 47 | }, 48 | insert = { a = { fg = colors.base, bg = colors.peach } }, 49 | visual = { a = { fg = colors.base, bg = colors.green } }, 50 | replace = { a = { fg = colors.base, bg = colors.green } }, 51 | } 52 | 53 | -- ─[ SPACE ]──────────────────────────────────────────────── 54 | local space = { 55 | function() 56 | return ' ' 57 | end, 58 | color = { bg = colors.base, fg = colors.blue }, 59 | } 60 | 61 | -- ╓ ╖ 62 | -- ║ LEFT ║ 63 | -- ╙ ╜ 64 | 65 | -- ─[ MODES ]──────────────────────────────────────────────── 66 | local modes = { 67 | 'mode', 68 | color = function() 69 | local mode_color = modecolor 70 | return { bg = mode_color[vim.fn.mode()], fg = colors.mantle, gui = 'bold' } 71 | end, 72 | separator = { left = icon.ui.PowerlineSlantLeft, right = icon.ui.PowerlineSlantRight }, 73 | } 74 | 75 | -- ─[ FILENAME ]───────────────────────────────────────────── 76 | local filename = { 77 | 'filename', 78 | color = { bg = colors.blue, fg = colors.base, gui = 'bold' }, 79 | separator = { left = icon.ui.PowerlineSlantLeft, right = icon.ui.PowerlineSlantRight }, 80 | } 81 | 82 | -- ─[ FILETYPE ]───────────────────────────────────────────── 83 | local filetype = { 84 | 'filetype', 85 | icons_enabled = false, 86 | color = { bg = colors.crust, fg = colors.blue, gui = 'italic,bold' }, 87 | separator = { left = icon.ui.PowerlineSlantLeft, right = icon.ui.PowerlineSlantRight }, 88 | } 89 | 90 | -- ─[ BRANCH ]─────────────────────────────────────────────── 91 | local branch = { 92 | 'branch', 93 | icon = '', 94 | color = { bg = colors.teal, fg = colors.base, gui = 'bold' }, 95 | separator = { left = icon.ui.PowerlineSlantLeft, right = icon.ui.PowerlineSlantRight }, 96 | } 97 | 98 | -- ─[ DIFF ]───────────────────────────────────────────────── 99 | local diff = { 100 | 'diff', 101 | color = { bg = colors.crust, fg = colors.green, gui = 'bold' }, 102 | separator = { left = icon.ui.PowerlineSlantLeft, right = icon.ui.PowerlineSlantRight }, 103 | symbols = { added = icon.git.Add, modified = icon.git.Mod, removed = icon.git.Remove }, 104 | 105 | diff_color = { 106 | added = { fg = colors.sky }, 107 | modified = { fg = colors.yellow }, 108 | removed = { fg = colors.red }, 109 | }, 110 | } 111 | 112 | -- ─[ LOCATION ]───────────────────────────────────────────── 113 | local location = { 114 | 'location', 115 | color = { bg = colors.crust, fg = colors.yellow, gui = 'bold' }, 116 | separator = { left = icon.ui.PowerlineSlantLeft, right = icon.ui.PowerlineSlantRight }, 117 | } 118 | 119 | -- ╓ ╖ 120 | -- ║ RIGHT ║ 121 | -- ╙ ╜ 122 | 123 | -- ─[ MACRO ]──────────────────────────────────────────────── 124 | local function check_macro() 125 | local recording_register = vim.fn.reg_recording() 126 | if recording_register == '' then 127 | return '' 128 | else 129 | return 'recording @' .. recording_register 130 | end 131 | end 132 | 133 | local macro = { 134 | function() 135 | return check_macro() 136 | end, 137 | color = { fg = colors.red, bg = colors.base, gui = 'italic,bold' }, 138 | } 139 | 140 | -- ─[ MODES NOICE ]────────────────────────────────────────── 141 | -- local modes_noice = { 142 | -- require('noice').api.status.mode.get, 143 | -- cond = require('noice').api.status.mode.has, 144 | -- color = { fg = colors.red, bg = colors.base, gui = 'italic,bold' }, 145 | -- } 146 | 147 | -- ─[ DIAGNOSTICS ]────────────────────────────────────────── 148 | local dia = { 149 | 'diagnostics', 150 | sources = { 'nvim_diagnostic' }, 151 | symbols = { error = ' ', warn = ' ', info = ' ', hint = ' ' }, 152 | diagnostics_color = { 153 | error = { fg = colors.red }, 154 | warn = { fg = colors.yellow }, 155 | info = { fg = colors.maroon }, 156 | hint = { fg = colors.sapphire }, 157 | }, 158 | color = { bg = colors.crust, fg = colors.blue, gui = 'bold' }, 159 | separator = { left = icon.ui.PowerlineSlantLeft, right = icon.ui.PowerlineSlantRight }, 160 | } 161 | 162 | -- ─[ LAZY UPDATES ]───────────────────────────────────────── 163 | local lazy_updates = { 164 | require('lazy.status').updates, 165 | cond = require('lazy.status').has_updates, 166 | on_click = function() 167 | vim.cmd('Lazy') 168 | end, 169 | color = { fg = colors.pink, bg = colors.crust }, 170 | separator = { left = icon.ui.PowerlineSlantLeft, right = icon.ui.PowerlineSlantRight }, 171 | } 172 | 173 | -- ─[ MASON ]──────────────────────────────────────────────── 174 | local function lualine_mason_updates() 175 | local registry = require('mason-registry') 176 | local installed_packages = registry.get_installed_package_names() 177 | local packages_outdated = 0 178 | 179 | for _, pkg_name in ipairs(installed_packages) do 180 | local pkg = registry.get_package(pkg_name) 181 | if pkg then 182 | local ok_installed, installed_version = pcall(pkg.get_installed_version, pkg) 183 | local ok_latest, latest_version = pcall(pkg.get_latest_version, pkg) 184 | if ok_installed and ok_latest and installed_version ~= latest_version then 185 | packages_outdated = packages_outdated + 1 186 | end 187 | end 188 | end 189 | 190 | return packages_outdated > 0 and tostring(packages_outdated) or '' 191 | end 192 | 193 | local mason_updates = { 194 | lualine_mason_updates, 195 | icon = ' ', 196 | on_click = function() 197 | vim.cmd('Mason') 198 | end, 199 | color = { fg = colors.green, bg = colors.crust }, 200 | separator = { left = icon.ui.PowerlineSlantLeft, right = icon.ui.PowerlineSlantRight }, 201 | } 202 | 203 | -- ─[ LSP ]────────────────────────────────────────────────── 204 | local lsp_status = { 205 | 'lsp_status', 206 | separator = { left = icon.ui.PowerlineSlantLeft, right = icon.ui.PowerlineSlantRight }, 207 | color = { bg = colors.peach, fg = colors.base, gui = 'italic,bold' }, 208 | } 209 | 210 | local no_servers = { 211 | function() 212 | return ' No servers' 213 | end, 214 | cond = function() 215 | local bufnr = vim.api.nvim_get_current_buf() 216 | local buf_clients = vim.lsp.get_clients({ bufnr = bufnr }) 217 | return next(buf_clients) == nil 218 | end, 219 | separator = { left = icon.ui.PowerlineSlantLeft, right = icon.ui.PowerlineSlantRight }, 220 | color = { bg = colors.peach, fg = colors.base, gui = 'italic,bold' }, 221 | } 222 | 223 | -- ─[ FORMATTERS & LINTERS ]───────────────────────────────── 224 | local function getFormatterAndLinter() 225 | local buf_ft = vim.bo.filetype 226 | local buf_client_names = {} 227 | 228 | local lint_s, lint = pcall(require, 'lint') 229 | if lint_s then 230 | for ft_k, ft_v in pairs(lint.linters_by_ft) do 231 | if type(ft_v) == 'table' then 232 | for _, linter in ipairs(ft_v) do 233 | if buf_ft == ft_k then 234 | table.insert(buf_client_names, linter) 235 | end 236 | end 237 | elseif type(ft_v) == 'string' then 238 | if buf_ft == ft_k then 239 | table.insert(buf_client_names, ft_v) 240 | end 241 | end 242 | end 243 | end 244 | 245 | local ok, conform = pcall(require, 'conform') 246 | local formatters = table.concat(conform.list_formatters_for_buffer(), ' ') 247 | if ok then 248 | for formatter in formatters:gmatch('%w+') do 249 | if formatter then 250 | table.insert(buf_client_names, formatter) 251 | end 252 | end 253 | end 254 | 255 | local hash = {} 256 | local unique_client_names = {} 257 | 258 | for _, v in ipairs(buf_client_names) do 259 | if not hash[v] then 260 | unique_client_names[#unique_client_names + 1] = v 261 | hash[v] = true 262 | end 263 | end 264 | local formatters_linters = table.concat(unique_client_names, ', ') 265 | 266 | if formatters_linters == '' then 267 | return '' 268 | else 269 | return '  ' .. formatters_linters 270 | end 271 | end 272 | 273 | local formatters_linters = { 274 | function() 275 | return getFormatterAndLinter() 276 | end, 277 | color = { bg = colors.crust, fg = colors.yellow, gui = 'italic,bold' }, 278 | separator = { left = icon.ui.PowerlineSlantLeft, right = icon.ui.PowerlineSlantRight }, 279 | } 280 | 281 | -- ─[ SETUP ]──────────────────────────────────────────────── 282 | require('lualine').setup({ 283 | options = { 284 | disabled_filetypes = { 285 | statusline = { 286 | 'lazy', 287 | 'mason', 288 | 'checkhealth', 289 | 'dashboard', 290 | 'TelescopePrompt', 291 | 'snipe-menu', 292 | }, 293 | }, 294 | icons_enabled = true, 295 | theme = theme, 296 | component_separators = { left = '', right = '' }, 297 | section_separators = { left = '', right = '' }, 298 | ignore_focus = { 299 | 'git', 300 | 'neo-tree', 301 | 'Outline', 302 | 'qf', 303 | 'SymbolsSidebar', 304 | 'trouble', 305 | }, 306 | always_divide_middle = true, 307 | globalstatus = true, 308 | }, 309 | sections = { 310 | lualine_a = { 311 | modes, 312 | }, 313 | lualine_b = { 314 | space, 315 | }, 316 | lualine_c = { 317 | filename, 318 | filetype, 319 | space, 320 | branch, 321 | diff, 322 | space, 323 | location, 324 | }, 325 | lualine_x = { 326 | space, 327 | }, 328 | lualine_y = { 329 | macro, 330 | space, 331 | }, 332 | lualine_z = { 333 | dia, 334 | space, 335 | lazy_updates, 336 | space, 337 | mason_updates, 338 | space, 339 | lsp_status, 340 | no_servers, 341 | formatters_linters, 342 | }, 343 | }, 344 | inactive_sections = { 345 | lualine_a = {}, 346 | lualine_b = {}, 347 | lualine_c = { 'filename' }, 348 | lualine_x = { 'location' }, 349 | lualine_y = {}, 350 | lualine_z = {}, 351 | }, 352 | }) 353 | end, 354 | } 355 | -------------------------------------------------------------------------------- /lua/plugins/luasnip.lua: -------------------------------------------------------------------------------- 1 | return { 2 | 'L3MON4D3/LuaSnip', 3 | enabled = false, 4 | version = 'v2.*', 5 | event = 'InsertEnter', 6 | dependencies = { 7 | 'rafamadriz/friendly-snippets', 8 | }, 9 | build = 'make install_jsregexp', 10 | config = function() 11 | local ls = require('luasnip') 12 | local types = require('luasnip.util.types') 13 | ls.config.set_config({ 14 | history = true, --keep around last snippet local to jump back 15 | updateevents = 'TextChanged,TextChangedI', --update changes as you type 16 | enable_autosnippets = true, 17 | ext_opts = { 18 | [types.choiceNode] = { 19 | active = { 20 | virt_text = { { '●', 'DiagnosticHint' } }, 21 | }, 22 | }, 23 | }, 24 | }) 25 | 26 | -- Luasnip keys 27 | vim.keymap.set({ 'i', 's' }, '', function() 28 | ls.expand() 29 | end) 30 | 31 | vim.keymap.set({ 'i', 's' }, '', function() 32 | ls.jump(1) 33 | end) 34 | 35 | vim.keymap.set({ 'i', 's' }, '', function() 36 | ls.jump(-1) 37 | end) 38 | 39 | -- Luasnip Choice Nodes 40 | vim.keymap.set({ 'i', 's' }, '', function() 41 | if ls.choice_active() then 42 | ls.change_choice(1) 43 | end 44 | end, { silent = true }) 45 | 46 | vim.keymap.set({ 'i', 's' }, '', function() 47 | if ls.choice_active() then 48 | ls.change_choice(-1) 49 | end 50 | end, { silent = true }) 51 | 52 | -- Disable diagnostics while expandingon select mode 53 | local augroup = vim.api.nvim_create_augroup('luasnip-expand', { clear = true }) 54 | 55 | vim.api.nvim_create_autocmd('ModeChanged', { 56 | group = augroup, 57 | pattern = '*:s', 58 | callback = function() 59 | if ls.in_snippet() then 60 | return vim.diagnostic.enable(false) 61 | end 62 | end, 63 | }) 64 | 65 | vim.api.nvim_create_autocmd('ModeChanged', { 66 | group = augroup, 67 | -- pattern = '[is]:n', 68 | -- pattern = '*:n', 69 | pattern = 'n', 70 | callback = function() 71 | if ls.in_snippet() then 72 | return vim.diagnostic.enable(true) 73 | end 74 | end, 75 | }) 76 | end, 77 | } 78 | -------------------------------------------------------------------------------- /lua/plugins/markdown-preview.lua: -------------------------------------------------------------------------------- 1 | return { 2 | 'iamcco/markdown-preview.nvim', 3 | cmd = { 'MarkdownPreviewToggle', 'MarkdownPreview', 'MarkdownPreviewStop' }, 4 | ft = 'markdown', 5 | build = function() 6 | vim.fn['mkdp#util#install']() 7 | end, 8 | } 9 | -------------------------------------------------------------------------------- /lua/plugins/markdown-table-mode.lua: -------------------------------------------------------------------------------- 1 | return { 2 | 'Kicamon/markdown-table-mode.nvim', 3 | ft = 'markdown', 4 | config = true, 5 | } 6 | -------------------------------------------------------------------------------- /lua/plugins/markview.lua: -------------------------------------------------------------------------------- 1 | return { 2 | 'OXY2DEV/markview.nvim', 3 | enabled = true, 4 | event = { 'BufReadPre', 'BufNewFile' }, 5 | config = function() 6 | local presets = require('markview.presets').headings 7 | require('markview').setup({ 8 | markdown = { 9 | headings = presets.glow, 10 | }, 11 | typst = { 12 | enable = false, 13 | }, 14 | preview = { 15 | icon_provider = 'devicons', -- "mini" or "devicons" or "internal" 16 | }, 17 | }) 18 | end, 19 | } 20 | -------------------------------------------------------------------------------- /lua/plugins/mason-lspconfig.lua: -------------------------------------------------------------------------------- 1 | return { 2 | 'mason-org/mason-lspconfig.nvim', 3 | enabled = true, 4 | lazy = true, 5 | opts = { 6 | automatic_enable = false, 7 | }, 8 | } 9 | -------------------------------------------------------------------------------- /lua/plugins/mason.lua: -------------------------------------------------------------------------------- 1 | return { 2 | 'mason-org/mason.nvim', 3 | build = ':MasonUpdate', 4 | lazy = true, 5 | opts = { 6 | ui = { 7 | icons = { 8 | package_installed = ' ', 9 | package_pending = ' ', 10 | package_uninstalled = ' ', 11 | }, 12 | border = 'single', 13 | height = 0.8, 14 | }, 15 | }, 16 | } 17 | -------------------------------------------------------------------------------- /lua/plugins/mini-align.lua: -------------------------------------------------------------------------------- 1 | return { 2 | 'echasnovski/mini.align', 3 | enabled = true, 4 | version = false, 5 | event = { 'BufReadPre', 'BufNewFile' }, 6 | config = true, 7 | } 8 | -------------------------------------------------------------------------------- /lua/plugins/mini-indentscope.lua: -------------------------------------------------------------------------------- 1 | return { 2 | 'echasnovski/mini.indentscope', 3 | enabled = true, 4 | event = 'BufReadPre', 5 | version = false, 6 | init = function() 7 | local colors = require('catppuccin.palettes').get_palette('mocha') 8 | vim.api.nvim_set_hl(0, 'MiniIndentscopeSymbol', { fg = colors.sapphire }) 9 | vim.api.nvim_create_autocmd('Filetype', { 10 | pattern = { 11 | 'checkhealth', 12 | 'comment-box', 13 | 'fzf', 14 | 'glowpreview', 15 | 'grug-far-help', 16 | 'help', 17 | 'lazy', 18 | 'lspinfo', 19 | 'markdown', 20 | 'mason', 21 | 'neo-tree', 22 | 'NeogitPopup', 23 | 'NeogitStatus', 24 | 'noice', 25 | 'notify', 26 | 'NvimTree', 27 | 'oil', 28 | 'oil_preview', 29 | 'Outline', 30 | 'toggleterm', 31 | 'Trouble', 32 | 'typst', 33 | }, 34 | callback = function() 35 | vim.b.miniindentscope_disable = true 36 | end, 37 | }) 38 | end, 39 | opts = { 40 | options = { try_as_border = true }, 41 | symbol = '│', 42 | }, 43 | } 44 | -------------------------------------------------------------------------------- /lua/plugins/multicursor.lua: -------------------------------------------------------------------------------- 1 | return { 2 | 'jake-stewart/multicursor.nvim', 3 | branch = '1.0', 4 | event = { 'BufReadPre', 'BufNewFile' }, 5 | config = function() 6 | -- stylua: ignore start 7 | local mc = require('multicursor-nvim') 8 | 9 | mc.setup() 10 | 11 | local set = vim.keymap.set 12 | 13 | -- ADD MATCH CURSOR 14 | set({ 'n', 'v' }, '', function() mc.matchAddCursor(1) end, { desc = 'Add multicursor match next' }) 15 | 16 | -- ADD CURSOR UP/DOWN 17 | set({ 'n', 'x' }, '', function() mc.lineAddCursor(-1) end, { desc = 'Add multicursor up' }) 18 | set({ 'n', 'x' }, '', function() mc.lineAddCursor(1) end, { desc = 'Add multicursor down' }) 19 | 20 | -- TOGGLE CURSOR 21 | set({ 'n', 'x' }, '', mc.toggleCursor, { desc = 'Toggle multicursor' }) 22 | 23 | -- OPERATOR 24 | set('n', 'ga', mc.addCursorOperator, { desc = 'Add multicursor operator' }) 25 | 26 | -- CLONE EVERY CURSOR AND DISABLE THE ORIGINALS. 27 | set({ 'n', 'x' }, '\\d', mc.duplicateCursors, { desc = 'Duplicate multicursor' }) 28 | 29 | -- ALIGN CURSOR COLUMNS. 30 | set('n', '\\a', mc.alignCursors, { desc = 'Align multicursor' }) 31 | 32 | -- MATCH NEW CURSORS WITHIN VISUAL SELECTIONS BY REGEX. 33 | set('x', '\\r', mc.matchCursors, { desc = 'Match multicursor in visual by regex' }) 34 | 35 | -- BRING BACK CURSORS IF YOU ACCIDENTALLY CLEAR THEM 36 | set('n', '\\gv', mc.restoreCursors, { desc = 'Restore multicursor' }) 37 | 38 | -- ADD A CURSOR FOR ALL MATCHES OF CURSOR WORD/SELECTION IN THE DOCUMENT. 39 | set({ 'n', 'x' }, '\\A', mc.matchAllAddCursors, { desc = 'Add multicursor under the cursor' }) 40 | 41 | -- APPEND/INSERT FOR EACH LINE OF VISUAL SELECTIONS. 42 | -- SIMILAR TO BLOCK SELECTION INSERTION. 43 | set('x', 'I', mc.insertVisual, { desc = 'Insert multicursor for each line' }) 44 | set('x', 'A', mc.appendVisual, { desc = 'Append multicursor for each line' }) 45 | 46 | -- INCREMENT/DECREMENT SEQUENCES, TREAING ALL CURSORS AS ONE SEQUENCE. 47 | set({ 'n', 'x' }, 'g', mc.sequenceIncrement, { desc = 'Increment sequence multicursor' }) 48 | set({ 'n', 'x' }, 'g', mc.sequenceDecrement, { desc = 'Decrement sequence multicursor' }) 49 | 50 | -- ADD A CURSOR TO EVERY SEARCH RESULT IN THE BUFFER. 51 | set('n', '\\\\A', mc.searchAllAddCursors, { desc = 'Add multicursor to every search result' }) 52 | 53 | -- ADD A CURSOR AND JUMP TO THE NEXT/PREVIOUS SEARCH RESULT. 54 | set('n', '\\\\n', function() mc.searchAddCursor(1) end, { desc = 'Add multicursor and jump to next search' }) 55 | set('n', '\\\\N', function() mc.searchAddCursor(-1) end, { desc = 'Add multicursor and jump to previous search' }) 56 | 57 | -- JUMP TO THE NEXT/PREVIOUS SEARCH RESULT WITHOUT ADDING A CURSOR. 58 | set('n', '\\\\s', function() mc.searchSkipCursor(1) end, { desc = 'Jump to next search without multicursor' }) 59 | set('n', '\\\\S', function() mc.searchSkipCursor(-1) end, { desc = 'Jump to previous search without multicursor' }) 60 | 61 | -- PRESSING `MIWAP` WILL CREATE A CURSOR IN EVERY MATCH OF THE 62 | -- STRING CAPTURED BY `IW` INSIDE RANGE `AP`. 63 | -- THIS ACTION IS HIGHLY CUSTOMIZABLE, SEE `:H MULTICURSOR-OPERATOR`. 64 | set({ 'n', 'x' }, 'm', mc.operator, { desc = 'Multicursor operator' }) 65 | 66 | -- ADD/SKIP CURSOR BY WORD FORWARD OR BACKWARD 67 | set('n', '', function() mc.addCursor('w') end, { desc = 'Add multicursor word forward' }) 68 | set('n', '', function() mc.addCursor('b') end, { desc = 'Add multicursor word backward' }) 69 | set('n', '\\', function() mc.skipCursor('w') end, { desc = 'Skip multicursor word forward' }) 70 | set('n', '\\', function() mc.skipCursor('b') end, { desc = 'Skip multicursor word backward' }) 71 | 72 | -- SPLIT VISUAL SELECTIONS BY REGEX. 73 | set('x', '\\l', mc.splitCursors, { desc = 'Split multicursor by regex' }) 74 | 75 | -- ROTATE THE TEXT CONTAINED IN EACH VISUAL SELECTION BETWEEN CURSORS. 76 | set("x", "\\t", function() mc.transposeCursors(1) end, { desc = 'Transponse multicursor down' }) 77 | set("x", "\\T", function() mc.transposeCursors(-1) end, { desc = 'Transponse multicursor up' }) 78 | 79 | -- MOUSE 80 | set('n', '', mc.handleMouse) 81 | set('n', '', mc.handleMouseDrag) 82 | set('n', '', mc.handleMouseRelease) 83 | 84 | -- EXIT MULTICURSOR 85 | set('n', '', function() 86 | if not mc.cursorsEnabled() then 87 | mc.enableCursors() 88 | elseif mc.hasCursors() then 89 | mc.clearCursors() 90 | else 91 | vim.cmd('noh') 92 | end 93 | end) 94 | 95 | mc.addKeymapLayer(function(layerSet) 96 | layerSet({ 'n', 'x' }, '', mc.prevCursor) 97 | layerSet({ 'n', 'x' }, '', mc.nextCursor) 98 | layerSet({ 'n', 'x' }, '\\x', mc.deleteCursor) 99 | layerSet({ 'n', 'x' }, 'q', function() mc.matchSkipCursor(1) end) 100 | layerSet({ 'n', 'x' }, 'Q', function() mc.matchSkipCursor(-1) end) 101 | layerSet({ 'n', 'x' }, 'n', function() mc.matchAddCursor(1) end) 102 | layerSet({ 'n', 'x' }, 'N', function() mc.matchAddCursor(-1) end) 103 | 104 | layerSet("n", "", function() 105 | if not mc.cursorsEnabled() then 106 | mc.enableCursors() 107 | else 108 | mc.clearCursors() 109 | end 110 | end) 111 | end) 112 | 113 | -- CUSTOMIZE HOW CURSORS LOOK. 114 | local hl = vim.api.nvim_set_hl 115 | hl(0, "MultiCursorCursor", { reverse = true }) 116 | hl(0, 'MultiCursorVisual', { link = 'Visual' }) 117 | hl(0, 'MultiCursorSign', { link = 'SignColumn' }) 118 | hl(0, 'MultiCursorDisabledCursor', { link = 'Visual' }) 119 | hl(0, 'MultiCursorDisabledVisual', { link = 'Visual' }) 120 | hl(0, 'MultiCursorDisabledSign', { link = 'SignColumn' }) 121 | -- stylua: ignore end 122 | end, 123 | } 124 | -------------------------------------------------------------------------------- /lua/plugins/neo-tree.lua: -------------------------------------------------------------------------------- 1 | return { 2 | 'nvim-neo-tree/neo-tree.nvim', 3 | enabled = true, 4 | branch = 'v3.x', 5 | cmd = 'Neotree', 6 | keys = { 7 | { 8 | 'e', 9 | function() 10 | require('neo-tree.command').execute({ 11 | toggle = true, 12 | source = 'filesystem', 13 | position = 'right', 14 | }) 15 | end, 16 | desc = 'Neotree Filesystem', 17 | }, 18 | { 19 | 'e', 20 | function() 21 | require('neo-tree.command').execute({ 22 | toggle = true, 23 | source = 'filesystem', 24 | position = 'float', 25 | }) 26 | end, 27 | desc = 'Neotree Float Filesystem', 28 | }, 29 | { 30 | 'bb', 31 | function() 32 | require('neo-tree.command').execute({ 33 | toggle = true, 34 | source = 'buffers', 35 | position = 'float', 36 | }) 37 | end, 38 | desc = 'Neotree Float Buffers', 39 | }, 40 | }, 41 | dependencies = { 42 | 'nvim-lua/plenary.nvim', 43 | 'nvim-tree/nvim-web-devicons', 44 | 'MunifTanjim/nui.nvim', 45 | }, 46 | opts = { 47 | popup_border_style = 'single', 48 | default_component_configs = { 49 | icon = { 50 | folder_closed = '', 51 | folder_open = '', 52 | folder_empty = '', 53 | }, 54 | git_status = { 55 | symbols = { 56 | -- Status type 57 | unstaged = '', 58 | }, 59 | }, 60 | diagnostics = { 61 | symbols = { 62 | hint = '󰌶', 63 | info = '', 64 | warn = '', 65 | error = '', 66 | }, 67 | }, 68 | }, 69 | commands = { 70 | image_wezterm = function(state) 71 | local node = state.tree:get_node() 72 | if node.type == 'file' then 73 | require('image_preview').PreviewImage(node.path) 74 | end 75 | end, 76 | }, 77 | window = { 78 | mappings = { 79 | ['h'] = function(state) 80 | local node = state.tree:get_node() 81 | if node.type == 'directory' and node:is_expanded() then 82 | require('neo-tree.sources.filesystem').toggle_directory(state, node) 83 | else 84 | require('neo-tree.ui.renderer').focus_node(state, node:get_parent_id()) 85 | end 86 | end, 87 | ['l'] = function(state) 88 | local node = state.tree:get_node() 89 | local path = node:get_id() 90 | if node.type == 'directory' then 91 | if not node:is_expanded() then 92 | require('neo-tree.sources.filesystem').toggle_directory(state, node) 93 | elseif node:has_children() then 94 | require('neo-tree.ui.renderer').focus_node(state, node:get_child_ids()[1]) 95 | end 96 | end 97 | if node.type == 'file' then 98 | require('neo-tree.utils').open_file(state, path) 99 | end 100 | end, 101 | ['E'] = function() 102 | vim.api.nvim_exec2('Neotree focus filesystem right', { output = true }) 103 | end, 104 | ['B'] = function() 105 | vim.api.nvim_exec2('Neotree focus buffers right', { output = true }) 106 | end, 107 | ['G'] = function() 108 | vim.api.nvim_exec2('Neotree focus git_status right', { output = true }) 109 | end, 110 | ['O'] = { 'show_help', nowait = false, config = { title = 'Order by', prefix_key = 'o' } }, 111 | ['o'] = 'open', 112 | ['p'] = 'image_wezterm', 113 | }, 114 | }, 115 | filesystem = { 116 | filtered_items = { 117 | hide_dotfiles = false, 118 | hide_gitignored = false, 119 | }, 120 | -- follow_current_file = { 121 | -- enabled = true, 122 | -- }, 123 | window = { 124 | mappings = { 125 | ['O'] = { 'show_help', nowait = false, config = { title = 'Order by', prefix_key = 'o' } }, 126 | }, 127 | }, 128 | }, 129 | event_handlers = { 130 | { 131 | event = 'file_opened', 132 | handler = function(file_path) 133 | require('neo-tree.command').execute({ action = 'close' }) 134 | end, 135 | }, 136 | }, 137 | }, 138 | } 139 | -------------------------------------------------------------------------------- /lua/plugins/noice.lua: -------------------------------------------------------------------------------- 1 | return { 2 | 'folke/noice.nvim', 3 | event = 'VeryLazy', 4 | opts = { 5 | cmdline = { 6 | format = { 7 | search_replace = { kind = 'search', pattern = '^:%%s/', icon = '󰛔', lang = 'regex' }, 8 | }, 9 | }, 10 | messages = { 11 | view_history = 'popup', 12 | }, 13 | commands = { 14 | history = { 15 | view = 'popup', 16 | }, 17 | }, 18 | lsp = { 19 | hover = { enabled = false }, 20 | progress = { 21 | enabled = false, 22 | }, 23 | override = { 24 | ['vim.lsp.util.convert_input_to_markdown_lines'] = true, 25 | ['vim.lsp.util.stylize_markdown'] = true, 26 | }, 27 | signature = { 28 | enabled = false, 29 | }, 30 | }, 31 | presets = { 32 | inc_rename = true, 33 | }, 34 | views = { 35 | cmdline_popup = { 36 | position = { 37 | row = 3, 38 | col = '50%', 39 | }, 40 | border = { 41 | style = 'single', 42 | }, 43 | }, 44 | popup = { 45 | size = { 46 | width = '80%', 47 | height = '70%', 48 | }, 49 | border = { 50 | style = 'single', 51 | }, 52 | win_options = { 53 | wrap = true, 54 | }, 55 | }, 56 | }, 57 | routes = { 58 | -- ╭───────────────────────╮ 59 | -- │ SEND MESSAGES TO MINI │ 60 | -- ╰───────────────────────╯ 61 | { 62 | view = 'mini', 63 | filter = { 64 | event = 'msg_show', 65 | any = { 66 | { find = '; after #%d+' }, 67 | { find = '; before #%d+' }, 68 | { find = 'fewer lines' }, 69 | { find = 'written' }, 70 | }, 71 | }, 72 | }, 73 | -- { 74 | -- view = 'mini', 75 | -- filter = { 76 | -- event = 'msg_showcmd', 77 | -- }, 78 | -- }, 79 | { 80 | view = 'mini', 81 | filter = { 82 | event = 'notify', 83 | any = { 84 | { find = 'hidden' }, 85 | { find = 'clipboard' }, 86 | { find = 'Deleted' }, 87 | { find = 'Renamed' }, 88 | { find = 'file_browser' }, 89 | }, 90 | }, 91 | }, 92 | -- ╭───────────────╮ 93 | -- │ SKIP MESSAGES │ 94 | -- ╰───────────────╯ 95 | { 96 | filter = { 97 | event = 'msg_show', 98 | kind = '', 99 | any = { 100 | { find = 'catalog' }, 101 | }, 102 | }, 103 | opts = { skip = true }, 104 | }, 105 | -- { 106 | -- filter = { 107 | -- event = 'notify', 108 | -- kind = 'info', 109 | -- any = { 110 | -- { find = 'hidden' }, 111 | -- }, 112 | -- }, 113 | -- opts = { skip = true }, 114 | -- }, 115 | }, 116 | }, 117 | } 118 | -------------------------------------------------------------------------------- /lua/plugins/nvim-autopairs.lua: -------------------------------------------------------------------------------- 1 | return { 2 | 'windwp/nvim-autopairs', 3 | enabled = true, 4 | event = 'InsertEnter', 5 | config = function() 6 | require('nvim-autopairs').setup({ 7 | fast_wrap = {}, 8 | }) 9 | 10 | local npairs = require('nvim-autopairs') 11 | local Rule = require('nvim-autopairs.rule') 12 | local cond = require('nvim-autopairs.conds') 13 | 14 | local brackets = { { '(', ')' }, { '[', ']' }, { '{', '}' } } 15 | 16 | -- ADD SPACES BETWEEN PARENTHESES 17 | npairs.add_rules({ 18 | -- Rule for a pair with left-side ' ' and right side ' ' 19 | Rule(' ', ' ') 20 | -- Pair will only occur if the conditional function returns true 21 | :with_pair( 22 | function(opts) 23 | -- We are checking if we are inserting a space in (), [], or {} 24 | local pair = opts.line:sub(opts.col - 1, opts.col) 25 | return vim.tbl_contains({ 26 | brackets[1][1] .. brackets[1][2], 27 | brackets[2][1] .. brackets[2][2], 28 | brackets[3][1] .. brackets[3][2], 29 | }, pair) 30 | end 31 | ) 32 | :with_move(cond.none()) 33 | :with_cr(cond.none()) 34 | -- We only want to delete the pair of spaces when the cursor is as such: ( | ) 35 | :with_del( 36 | function(opts) 37 | local col = vim.api.nvim_win_get_cursor(0)[2] 38 | local context = opts.line:sub(col - 1, col + 2) 39 | return vim.tbl_contains({ 40 | brackets[1][1] .. ' ' .. brackets[1][2], 41 | brackets[2][1] .. ' ' .. brackets[2][2], 42 | brackets[3][1] .. ' ' .. brackets[3][2], 43 | }, context) 44 | end 45 | ), 46 | }) 47 | 48 | -- ARROW KEY ON JAVASCRIPT 49 | npairs.add_rules({ 50 | Rule('%(.*%)%s*%=>$', ' { }', { 'typescript', 'typescriptreact', 'javascript' }) 51 | :use_regex(true) 52 | :set_end_pair_length(2), 53 | }) 54 | 55 | -- AUTO ADDSPACE ON = 56 | npairs.add_rules({ 57 | Rule('=', '') 58 | :with_pair(cond.not_inside_quote()) 59 | :with_pair(function(opts) 60 | local last_char = opts.line:sub(opts.col - 1, opts.col - 1) 61 | if last_char:match('[%w%=%s]') then 62 | return true 63 | end 64 | return false 65 | end) 66 | :replace_endpair(function(opts) 67 | local prev_2char = opts.line:sub(opts.col - 2, opts.col - 1) 68 | local next_char = opts.line:sub(opts.col, opts.col) 69 | next_char = next_char == ' ' and '' or ' ' 70 | if prev_2char:match('%w$') then 71 | return ' =' .. next_char 72 | end 73 | if prev_2char:match('%=$') then 74 | return next_char 75 | end 76 | if prev_2char:match('=') then 77 | return '=' .. next_char 78 | end 79 | return '' 80 | end) 81 | :set_end_pair_length(0) 82 | :with_move(cond.none()) 83 | :with_del(cond.none()), 84 | }) 85 | 86 | -- For each pair of brackets we will add another rule 87 | for _, bracket in pairs(brackets) do 88 | npairs.add_rules({ 89 | -- Each of these rules is for a pair with left-side '( ' and right-side ' )' for each bracket type 90 | Rule(bracket[1] .. ' ', ' ' .. bracket[2]) 91 | :with_pair(cond.none()) 92 | :with_move(function(opts) 93 | return opts.char == bracket[2] 94 | end) 95 | :with_del(cond.none()) 96 | :use_key(bracket[2]) 97 | -- Removes the trailing whitespace that can occur without this 98 | :replace_map_cr( 99 | function(_) 100 | return '2xiO' 101 | end 102 | ), 103 | }) 104 | end 105 | 106 | -- MOVE PAST COMMAS AND SEMICOLONS 107 | for _, punct in pairs({ ',', ';' }) do 108 | require('nvim-autopairs').add_rules({ 109 | require('nvim-autopairs.rule')('', punct) 110 | :with_move(function(opts) 111 | return opts.char == punct 112 | end) 113 | :with_pair(function() 114 | return false 115 | end) 116 | :with_del(function() 117 | return false 118 | end) 119 | :with_cr(function() 120 | return false 121 | end) 122 | :use_key(punct), 123 | }) 124 | end 125 | end, 126 | } 127 | -------------------------------------------------------------------------------- /lua/plugins/nvim-dap-ui.lua: -------------------------------------------------------------------------------- 1 | return { 2 | 'rcarriga/nvim-dap-ui', 3 | keys = { 4 | { 'du', 'lua require("dapui").toggle()', desc = 'DAP UI Toggle' }, 5 | }, 6 | dependencies = { 7 | 'mfussenegger/nvim-dap', 8 | 'nvim-neotest/nvim-nio', 9 | }, 10 | config = true, 11 | } 12 | -------------------------------------------------------------------------------- /lua/plugins/nvim-dap.lua: -------------------------------------------------------------------------------- 1 | return { 2 | 'mfussenegger/nvim-dap', 3 | cmd = { 'DapToggleBreakpoint' }, 4 | keys = { 5 | { 'db', 'DapToggleBreakpoint', desc = 'Add Breakpoint' }, 6 | }, 7 | dependencies = { 8 | 'theHamsta/nvim-dap-virtual-text', 9 | opts = { 10 | commented = true, 11 | virt_text_pos = 'eol', 12 | }, 13 | }, 14 | config = function() 15 | require('plugins.dap.debug_adapter') 16 | end, 17 | } 18 | -------------------------------------------------------------------------------- /lua/plugins/nvim-highlight-colors.lua: -------------------------------------------------------------------------------- 1 | return { 2 | 'brenoprata10/nvim-highlight-colors', 3 | enabled = true, 4 | event = 'BufReadPre', 5 | opts = { 6 | render = 'virtual', ---@usage 'background'|'foreground'|'virtual' 7 | virtual_symbol = '', 8 | }, 9 | config = true, 10 | } 11 | -------------------------------------------------------------------------------- /lua/plugins/nvim-jdtls.lua: -------------------------------------------------------------------------------- 1 | return { 2 | 'mfussenegger/nvim-jdtls', 3 | ft = 'java', 4 | dependencies = { 5 | 'mfussenegger/nvim-dap', 6 | }, 7 | } 8 | -------------------------------------------------------------------------------- /lua/plugins/nvim-lint.lua: -------------------------------------------------------------------------------- 1 | return { 2 | 'mfussenegger/nvim-lint', 3 | event = { 'BufReadPre', 'BufNewFile' }, 4 | config = function() 5 | local lint = require('lint') 6 | lint.linters_by_ft = { 7 | javascript = { 'eslint' }, 8 | json = { 'jsonlint' }, 9 | vue = { 'eslint' }, 10 | yaml = { 'yamllint' }, 11 | } 12 | local lint_augroup = vim.api.nvim_create_augroup('lint', { clear = true }) 13 | vim.api.nvim_create_autocmd({ 'BufEnter', 'BufWritePost', 'InsertLeave' }, { 14 | group = lint_augroup, 15 | callback = function() 16 | lint.try_lint() 17 | end, 18 | }) 19 | end, 20 | } 21 | -------------------------------------------------------------------------------- /lua/plugins/nvim-lspconfig.lua: -------------------------------------------------------------------------------- 1 | return { 2 | 'neovim/nvim-lspconfig', 3 | event = { 'BufReadPre', 'BufReadPost', 'BufNewFile' }, 4 | depedencies = { 5 | { 'mason-org/mason.nvim' }, 6 | { 'mason-org/mason-lspconfig.nvim' }, 7 | { 'saghen/blink.cmp' }, 8 | }, 9 | config = function() 10 | require('mason').setup() 11 | require('mason-lspconfig').setup() 12 | end, 13 | } 14 | -------------------------------------------------------------------------------- /lua/plugins/nvim-navic.lua: -------------------------------------------------------------------------------- 1 | return { 2 | 'SmiteshP/nvim-navic', 3 | enabled = true, 4 | event = 'BufReadPre', 5 | dependencies = { 6 | 'neovim/nvim-lspconfig', 7 | }, 8 | opts = { 9 | highlight = true, 10 | separator = '  ', 11 | }, 12 | } 13 | -------------------------------------------------------------------------------- /lua/plugins/nvim-notify.lua: -------------------------------------------------------------------------------- 1 | return { 2 | 'rcarriga/nvim-notify', 3 | keys = { 4 | { 5 | 'nd', 6 | function() 7 | require('notify').dismiss({ silent = true, pending = true }) 8 | end, 9 | desc = 'Dismiss all Notifications', 10 | }, 11 | }, 12 | opts = { 13 | render = 'wrapped-compact', 14 | stages = 'fade_in_slide_out', 15 | timeout = 1000, 16 | max_height = function() 17 | return math.floor(vim.o.lines * 0.75) 18 | end, 19 | max_width = function() 20 | return math.floor(vim.o.columns * 0.75) 21 | end, 22 | on_open = function(win) 23 | vim.api.nvim_win_set_config(win, { zindex = 100, border = 'single' }) 24 | end, 25 | }, 26 | } 27 | -------------------------------------------------------------------------------- /lua/plugins/nvim-spider.lua: -------------------------------------------------------------------------------- 1 | return { 2 | 'chrisgrieser/nvim-spider', 3 | event = 'BufReadPost', 4 | config = function() 5 | -- Keymaps 6 | vim.keymap.set({ 'n', 'o', 'x' }, 'w', function() 7 | require('spider').motion('w') 8 | end, { desc = 'Spider-w' }) 9 | vim.keymap.set({ 'n', 'o', 'x' }, 'e', function() 10 | require('spider').motion('e') 11 | end, { desc = 'Spider-e' }) 12 | vim.keymap.set({ 'n', 'o', 'x' }, 'b', function() 13 | require('spider').motion('b') 14 | end, { desc = 'Spider-b' }) 15 | vim.keymap.set({ 'n', 'o', 'x' }, 'ge', function() 16 | require('spider').motion('ge') 17 | end, { desc = 'Spider-ge' }) 18 | end, 19 | } 20 | -------------------------------------------------------------------------------- /lua/plugins/nvim-surround.lua: -------------------------------------------------------------------------------- 1 | return { 2 | 'kylechui/nvim-surround', 3 | enabled = true, 4 | version = '3.0.0', 5 | event = { 'BufReadPre', 'BufNewFile' }, 6 | opts = { 7 | move_cursor = 'sticky', 8 | }, 9 | -- config = true, 10 | } 11 | -------------------------------------------------------------------------------- /lua/plugins/nvim-toggler.lua: -------------------------------------------------------------------------------- 1 | local keymap = require('utils.set_keymap') 2 | 3 | return { 4 | 'nguyenvukhang/nvim-toggler', 5 | keys = { 6 | { 'w', desc = 'Toggle Word' }, 7 | }, 8 | config = function() 9 | require('nvim-toggler').setup({ 10 | remove_default_keybinds = true, 11 | }) 12 | keymap.set({ 13 | mode = { 'n', 'v' }, 14 | key = 'w', 15 | cmd = require('nvim-toggler').toggle, 16 | desc = 'Toggle a Word', 17 | }) 18 | end, 19 | } 20 | -------------------------------------------------------------------------------- /lua/plugins/nvim-tree.lua: -------------------------------------------------------------------------------- 1 | return { 2 | 'nvim-tree/nvim-tree.lua', 3 | enabled = false, 4 | version = '*', 5 | lazy = false, 6 | cmd = 'NvimTreeToggle', 7 | keys = { 8 | { 'e', 'NvimTreeToggle', desc = 'File Browser' }, 9 | }, 10 | dependencies = 'nvim-tree/nvim-web-devicons', 11 | config = function() 12 | -- Always open nvim-tree 13 | -- local function open_nvim_tree() 14 | -- require('nvim-tree.api').tree.open() 15 | -- end 16 | 17 | local function my_on_attach(bufnr) 18 | local api = require('nvim-tree.api') 19 | 20 | local function opts(desc) 21 | return { desc = 'nvim-tree: ' .. desc, buffer = bufnr, noremap = true, silent = true, nowait = true } 22 | end 23 | 24 | -- default mappings 25 | api.config.mappings.default_on_attach(bufnr) 26 | 27 | -- custom mappings 28 | vim.keymap.set('n', '', api.tree.change_root_to_parent, opts('Up Change Directory')) 29 | vim.keymap.set('n', '', api.tree.change_root_to_node, opts('Change Root Directory')) 30 | vim.keymap.set('n', '?', api.tree.toggle_help, opts('Help')) 31 | end 32 | 33 | require('nvim-tree').setup({ 34 | on_attach = my_on_attach, 35 | hijack_cursor = true, 36 | view = { 37 | centralize_selection = true, 38 | side = 'right', 39 | width = 45, 40 | -- float = { 41 | -- enable = false, 42 | -- quit_on_focus_loss = true, 43 | -- open_win_config = { 44 | -- relative = 'editor', 45 | -- border = 'rounded', 46 | -- width = 40, 47 | -- height = 30, 48 | -- row = 1, 49 | -- col = 1, 50 | -- }, 51 | -- }, 52 | }, 53 | renderer = { 54 | highlight_git = true, 55 | icons = { 56 | git_placement = 'after', 57 | show = { 58 | folder_arrow = false, 59 | }, 60 | glyphs = { 61 | folder = { 62 | default = '', 63 | open = '', 64 | empty = '', 65 | empty_open = '', 66 | }, 67 | }, 68 | }, 69 | }, 70 | diagnostics = { 71 | enable = true, 72 | }, 73 | modified = { 74 | enable = true, 75 | }, 76 | actions = { 77 | open_file = { 78 | quit_on_open = true, 79 | }, 80 | }, 81 | }) 82 | -- open_nvim_tree() 83 | end, 84 | } 85 | -------------------------------------------------------------------------------- /lua/plugins/oil.lua: -------------------------------------------------------------------------------- 1 | return { 2 | 'stevearc/oil.nvim', 3 | enabled = true, 4 | keys = { 5 | { '°', 'Oil --float', desc = 'File browser' }, 6 | }, 7 | opts = { 8 | float = { 9 | max_width = 100, 10 | max_height = 80, 11 | }, 12 | }, 13 | } 14 | -------------------------------------------------------------------------------- /lua/plugins/outline.lua: -------------------------------------------------------------------------------- 1 | return { 2 | 'hedyhli/outline.nvim', 3 | enabled = true, 4 | cmd = 'Outline', 5 | keys = { 6 | { 'o', 'Outline', desc = 'Toggle Outline' }, 7 | }, 8 | opts = { 9 | outline_window = { 10 | width = 30, 11 | }, 12 | symbols = { 13 | icons = { 14 | Module = { icon = '全' }, 15 | Namespace = { icon = '' }, 16 | Package = { icon = '' }, 17 | Class = { icon = '' }, 18 | Method = { icon = '' }, 19 | Enum = { icon = '' }, 20 | Interface = { icon = '' }, 21 | Function = { icon = '' }, 22 | Variable = { icon = '󰫧' }, 23 | String = { icon = '󰅳' }, 24 | Boolean = { icon = '' }, 25 | Key = { icon = '' }, 26 | Null = { icon = '󰟢' }, 27 | Event = { icon = '' }, 28 | }, 29 | }, 30 | }, 31 | config = true, 32 | } 33 | -------------------------------------------------------------------------------- /lua/plugins/rainbow-delimiters.lua: -------------------------------------------------------------------------------- 1 | return { 2 | 'HiPhish/rainbow-delimiters.nvim', 3 | enabled = true, 4 | event = 'BufReadPre', 5 | config = function() 6 | local rainbow_delimiters = require('rainbow-delimiters') 7 | local christmas = require('rainbow-delimiters.strategy.christmas') 8 | local christmas_lights = christmas.lights(rainbow_delimiters.strategy['global']) 9 | 10 | vim.g.rainbow_delimiters = { 11 | strategy = { 12 | -- [''] = christmas_lights, 13 | [''] = rainbow_delimiters.strategy['global'], 14 | vim = rainbow_delimiters.strategy['local'], 15 | }, 16 | query = { 17 | [''] = 'rainbow-delimiters', 18 | lua = 'rainbow-blocks', 19 | }, 20 | highlight = { 21 | 'RainbowDelimiterRed', 22 | 'RainbowDelimiterYellow', 23 | 'RainbowDelimiterBlue', 24 | 'RainbowDelimiterOrange', 25 | 'RainbowDelimiterGreen', 26 | 'RainbowDelimiterViolet', 27 | 'RainbowDelimiterCyan', 28 | }, 29 | } 30 | end, 31 | } 32 | -------------------------------------------------------------------------------- /lua/plugins/rest.lua: -------------------------------------------------------------------------------- 1 | return { 2 | 'rest-nvim/rest.nvim', 3 | enabled = false, 4 | keys = { 5 | { 'R', 'lua require("rest-nvim").run()', desc = 'Rest API' }, 6 | }, 7 | dependencies = { 'nvim-lua/plenary.nvim' }, 8 | config = function() 9 | require('rest-nvim').setup({ 10 | -- Open request results in a horizontal split 11 | result_split_horizontal = false, 12 | -- Keep the http file buffer above|left when split horizontal|vertical 13 | result_split_in_place = false, 14 | -- Skip SSL verification, useful for unknown certificates 15 | skip_ssl_verification = false, 16 | -- Encode URL before making request 17 | encode_url = true, 18 | -- Highlight request on run 19 | highlight = { 20 | enabled = true, 21 | timeout = 150, 22 | }, 23 | result = { 24 | -- toggle showing URL, HTTP info, headers at top the of result window 25 | show_url = true, 26 | show_http_info = true, 27 | show_headers = true, 28 | -- executables or functions for formatting response body [optional] 29 | -- set them to false if you want to disable them 30 | formatters = { 31 | json = 'jq', 32 | html = function(body) 33 | return vim.fn.system({ 34 | 'jq', 35 | -- '-i', 36 | -- '-q', 37 | -- '-', 38 | }, body) 39 | end, 40 | }, 41 | }, 42 | -- Jump to request line on run 43 | jump_to_request = false, 44 | env_file = '.env', 45 | custom_dynamic_variables = {}, 46 | yank_dry_run = true, 47 | }) 48 | end, 49 | } 50 | -------------------------------------------------------------------------------- /lua/plugins/snipe.lua: -------------------------------------------------------------------------------- 1 | return { 2 | 'leath-dub/snipe.nvim', 3 | keys = { 4 | { 5 | '-', 6 | function() 7 | require('snipe').open_buffer_menu() 8 | end, 9 | desc = 'Open Snipe buffer menu', 10 | }, 11 | }, 12 | opts = { 13 | ui = { 14 | --- @type "topleft" | "bottomleft" | "topright" | "bottomright" | "center" | "cursor" 15 | position = 'center', 16 | preselect_current = true, 17 | text_align = 'file-first', 18 | }, 19 | hints = { 20 | ---@type string 21 | dictionary = 'asdfwecmpghio', 22 | }, 23 | navigate = { 24 | under_cursor = 'l', 25 | cancel_snipe = { '', 'q' }, 26 | open_split = 'S', 27 | }, 28 | sort = 'first', 29 | }, 30 | } 31 | -------------------------------------------------------------------------------- /lua/plugins/ssr.lua: -------------------------------------------------------------------------------- 1 | return { 2 | { 3 | 'cshuaimin/ssr.nvim', 4 | enabled = false, 5 | keys = { 6 | { 7 | 'r', 8 | function() 9 | require('ssr').open() 10 | end, 11 | mode = { 'n', 'x' }, 12 | desc = 'Structural Replace', 13 | }, 14 | }, 15 | }, 16 | } 17 | -------------------------------------------------------------------------------- /lua/plugins/statuscol.lua: -------------------------------------------------------------------------------- 1 | return { 2 | 'luukvbaal/statuscol.nvim', 3 | event = 'BufReadPre', 4 | config = function() 5 | local builtin = require('statuscol.builtin') 6 | require('statuscol').setup({ 7 | relculright = true, 8 | ft_ignore = { 'neo-tree' }, 9 | segments = { 10 | { sign = { name = { 'Dap' }, maxwidth = 1, auto = false }, click = 'v:lua.ScSa' }, 11 | { sign = { name = { 'todo*' }, maxwidth = 1 } }, 12 | { 13 | sign = { namespace = { 'diagnostic' }, maxwidth = 1, auto = false }, 14 | click = 'v:lua.ScSa', 15 | }, 16 | { 17 | sign = { namespace = { 'gitsigns*' }, maxwidth = 1, colwidth = 2, auto = false }, 18 | click = 'v:lua.ScSa', 19 | }, 20 | { text = { builtin.lnumfunc, ' ' }, click = 'v:lua.ScLa' }, 21 | { text = { builtin.foldfunc, ' ' }, click = 'v:lua.ScFa' }, 22 | }, 23 | }) 24 | end, 25 | } 26 | -------------------------------------------------------------------------------- /lua/plugins/symbols.lua: -------------------------------------------------------------------------------- 1 | return { 2 | 'oskarrrrrrr/symbols.nvim', 3 | enabled = true, 4 | cmd = 'Symbols', 5 | config = function() 6 | local r = require('symbols.recipes') 7 | require('symbols').setup(r.DefaultFilters, r.AsciiSymbols, { 8 | sidebar = { 9 | hide_cursor = false, 10 | open_direction = 'right', 11 | auto_resize = { 12 | enabled = true, 13 | min_width = 40, 14 | max_width = 60, 15 | }, 16 | }, 17 | }) 18 | end, 19 | } 20 | -------------------------------------------------------------------------------- /lua/plugins/telescope.lua: -------------------------------------------------------------------------------- 1 | return { 2 | 'nvim-telescope/telescope.nvim', 3 | cmd = { 'Telescope' }, 4 | keys = { 5 | { 'fb', 'Telescope buffers', desc = 'Find Buffers' }, 6 | { 'fc', ":lua require'telescope.builtin'.commands{}", desc = 'List Commands' }, 7 | { 'fd', 'Telescope diagnostics', desc = 'Find Diagnostics' }, 8 | { 'fe', 'Telescope file_browser', desc = 'File Browser' }, 9 | { 'ff', 'Telescope find_files', desc = 'Find Files' }, 10 | { 'fg', 'Telescope live_grep', desc = 'Find Word' }, 11 | { 'fh', 'Telescope help_tags', desc = 'Find Help' }, 12 | { 'fi', 'Telescope import', desc = 'Find Imports' }, 13 | { 'fj', 'Telescope emoji', desc = 'Find emoji' }, 14 | { 'fk', 'Telescope keymaps', desc = 'Find Keymaps' }, 15 | { 'fl', 'Telescope highlights', desc = 'Find Highlights' }, 16 | { 'fm', 'Telescope heading', desc = 'Find Heading' }, 17 | { 'fo', 'Telescope oldfiles', desc = 'Recently opened files' }, 18 | { 'fp', 'Telescope spell_suggest', desc = 'Find Spell Suggest' }, 19 | { 'fq', 'Telescope quickfix', desc = 'Find Quickix' }, 20 | { 'fr', 'Telescope grep_string', desc = 'Find Word Under Cursor' }, 21 | { 'fs', 'Telescope symbols', desc = 'Find Symbols' }, 22 | { 'ft', 'Telescope git_files', desc = 'Find Git Files' }, 23 | { 'fu', 'Telescope undo', desc = 'Find Undo' }, 24 | { 'fy', 'Telescope yank_history', mode = { 'n', 'x' }, desc = 'Find yanks' }, 25 | { 'fz', 'Telescope zoxide list', desc = 'Find Directory' }, 26 | }, 27 | dependencies = { 28 | 'nvim-lua/plenary.nvim', 29 | 'nvim-telescope/telescope-file-browser.nvim', 30 | 'nvim-telescope/telescope-symbols.nvim', 31 | 'xiyaowong/telescope-emoji.nvim', 32 | 'debugloop/telescope-undo.nvim', 33 | 'jvgrootveld/telescope-zoxide', 34 | 'piersolenski/telescope-import.nvim', 35 | 'crispgm/telescope-heading.nvim', 36 | }, 37 | config = function() 38 | local actions = require('telescope.actions') 39 | local action_layout = require('telescope.actions.layout') 40 | local fb_actions = require('telescope').extensions.file_browser.actions 41 | local open_with_trouble = require('trouble.sources.telescope').open 42 | 43 | require('telescope').setup({ 44 | defaults = { 45 | prompt_prefix = '  ', 46 | selection_caret = '▎ ', 47 | multi_icon = ' │ ', 48 | winblend = 0, 49 | borderchars = { '─', '│', '─', '│', '┌', '┐', '┘', '└' }, 50 | mappings = { 51 | i = { 52 | [''] = open_with_trouble, 53 | [''] = action_layout.toggle_preview, 54 | [''] = actions.preview_scrolling_down, 55 | [''] = actions.preview_scrolling_up, 56 | }, 57 | n = { 58 | [''] = open_with_trouble, 59 | ['q'] = require('telescope.actions').close, 60 | [''] = action_layout.toggle_preview, 61 | [''] = actions.preview_scrolling_down, 62 | [''] = actions.preview_scrolling_up, 63 | }, 64 | }, 65 | -- preview = { 66 | -- hide_on_startup = true, 67 | -- }, 68 | file_ignore_patterns = { 69 | 'node_modules', 70 | }, 71 | }, 72 | pickers = { 73 | buffers = { 74 | previewer = false, 75 | theme = 'dropdown', 76 | mappings = { 77 | n = { 78 | [''] = 'delete_buffer', 79 | ['l'] = 'select_default', 80 | }, 81 | }, 82 | initial_mode = 'normal', 83 | }, 84 | find_files = { 85 | -- theme = 'ivy', -- 'ivy', 'dropdown', 'cursor' 86 | -- layout_strategy = 'vertical', 87 | -- layout_config = { height = 0.9 }, 88 | -- previewer = false, 89 | path_display = { 'smart' }, 90 | layout_config = { 91 | prompt_position = 'top', 92 | preview_width = 0.5, 93 | -- width = 0.7, 94 | }, 95 | sorting_strategy = 'ascending', 96 | }, 97 | help_tags = { 98 | theme = 'ivy', 99 | }, 100 | symbols = { 101 | theme = 'dropdown', 102 | }, 103 | registers = { 104 | theme = 'ivy', 105 | }, 106 | grep_string = { 107 | initial_mode = 'normal', 108 | theme = 'ivy', 109 | }, 110 | live_grep = { 111 | theme = 'ivy', 112 | }, 113 | }, 114 | extensions = { 115 | file_browser = { 116 | dir_icon = '', 117 | prompt_path = true, 118 | grouped = true, 119 | theme = 'dropdown', 120 | initial_mode = 'normal', 121 | previewer = false, 122 | mappings = { 123 | n = { 124 | ['o'] = 'select_default', 125 | ['H'] = fb_actions.toggle_hidden, 126 | ['h'] = fb_actions.goto_parent_dir, 127 | ['l'] = 'select_default', 128 | }, 129 | }, 130 | }, 131 | undo = { 132 | initial_mode = 'normal', 133 | side_by_side = true, 134 | theme = 'ivy', 135 | layout_config = { 136 | preview_width = 0.7, 137 | }, 138 | }, 139 | heading = { 140 | treesitter = true, 141 | }, 142 | advanced_git_search = { 143 | diff_plugin = 'diffview', 144 | }, 145 | }, 146 | }) 147 | 148 | -- Extensions 149 | require('telescope').load_extension('emoji') 150 | require('telescope').load_extension('file_browser') 151 | require('telescope').load_extension('undo') 152 | require('telescope').load_extension('advanced_git_search') 153 | require('telescope').load_extension('zoxide') 154 | require('telescope').load_extension('import') 155 | require('telescope').load_extension('heading') 156 | require('telescope').load_extension('yank_history') 157 | -- require('telescope').load_extension('neoclip') 158 | -- require('telescope').load_extension('noice') 159 | end, 160 | } 161 | -------------------------------------------------------------------------------- /lua/plugins/theme/catppuccin.lua: -------------------------------------------------------------------------------- 1 | local ucolors = require('catppuccin.utils.colors') 2 | 3 | local catppuccin = require('catppuccin') 4 | 5 | catppuccin.setup({ 6 | transparent_background = true, 7 | styles = { 8 | keywords = { 'italic' }, 9 | variables = { 'italic' }, 10 | booleans = { 'italic' }, 11 | properties = { 'italic' }, 12 | }, 13 | -- Integrations 14 | integrations = { 15 | blink_cmp = true, 16 | colorful_winsep = { 17 | enabled = true, 18 | color = 'red', 19 | }, 20 | flash = true, 21 | grug_far = true, 22 | hop = true, 23 | lsp_trouble = true, 24 | mason = true, 25 | native_lsp = { 26 | enabled = true, 27 | underlines = { 28 | errors = { 'undercurl' }, 29 | hints = { 'undercurl' }, 30 | warnings = { 'undercurl' }, 31 | information = { 'undercurl' }, 32 | }, 33 | inlay_hints = { 34 | background = false, 35 | }, 36 | }, 37 | navic = { 38 | enabled = true, 39 | }, 40 | noice = true, 41 | notify = true, 42 | nvim_surround = true, 43 | nvimtree = false, 44 | }, 45 | custom_highlights = function(colors) 46 | return { 47 | -- Cursor 48 | Cursor = { fg = colors.base, bg = colors.text }, 49 | lCursor = { fg = colors.base, bg = colors.text }, 50 | CursorIM = { fg = colors.base, bg = colors.text }, 51 | 52 | -- Identifier (like keyword require) 53 | -- ['@function.builtin'] = { fg = colors.flamingo }, 54 | 55 | -- Variables 56 | -- ['@lsp.mod.global.lua'] = { fg = colors.red }, 57 | 58 | -- Completion Menu 59 | -- Pmenu = { bg = colors.mantle }, 60 | -- PmenuSel = { fg = colors.base, bg = colors.lavender, style = { 'bold', 'italic' } }, 61 | 62 | -- Telescope 63 | -- TelescopeBorder = { fg = colors.blue }, 64 | TelescopeSelectionCaret = { fg = colors.red }, 65 | TelescopeSelection = { fg = colors.text, bg = colors.crust, style = { 'bold' } }, 66 | TelescopeMatching = { fg = colors.red }, 67 | TelescopePromptPrefix = { fg = colors.red, bg = colors.crust }, 68 | TelescopePromptTitle = { fg = colors.crust, bg = colors.mauve, style = { 'bold', 'italic' } }, 69 | TelescopePromptNormal = { bg = colors.crust }, 70 | TelescopePromptBorder = { bg = colors.crust, fg = colors.crust }, 71 | TelescopeResultsNormal = { bg = colors.mantle }, 72 | TelescopeResultsTitle = { fg = colors.crust, bg = colors.green, style = { 'bold', 'italic' } }, 73 | TelescopeResultsBorder = { bg = colors.mantle, fg = colors.mantle }, 74 | TelescopePreviewNormal = { bg = colors.crust }, 75 | TelescopePreviewBorder = { bg = colors.crust, fg = colors.crust }, 76 | TelescopePreviewTitle = { fg = colors.crust, bg = colors.sapphire, style = { 'bold', 'italic' } }, 77 | 78 | -- Bufferline 79 | BufferLineInfo = { fg = colors.surface0 }, 80 | BufferLineInfoDiagnostic = { fg = colors.surface2 }, 81 | BufferLineHint = { fg = colors.surface2 }, 82 | BufferLineHintDiagnostic = { fg = colors.surface2 }, 83 | BufferLineWarning = { fg = colors.surface2 }, 84 | BufferLineWarningDiagnostic = { fg = colors.surface2 }, 85 | BufferLineError = { fg = colors.surface2 }, 86 | BufferLineErrorDiagnostic = { fg = colors.surface2 }, 87 | BufferLineSeparator = { fg = colors.base, bg = colors.base }, 88 | BufferLineSeparatorVisible = { fg = colors.base, bg = colors.base }, 89 | BufferLineSeparatorSelected = { fg = colors.base, bg = colors.base }, 90 | BufferLineTab = { fg = colors.overlay0 }, 91 | BufferLineTabSeparator = { fg = colors.base, bg = colors.base }, 92 | BufferLineTabSeparatorSelected = { fg = colors.base, bg = colors.base }, 93 | BufferLineIndicatorSelected = { fg = colors.pink }, 94 | BufferLineIndicator = { fg = colors.base }, 95 | TabLineSel = { bg = colors.pink }, 96 | -- BufferLineModifiedSelected = { fg = colors.teal }, 97 | 98 | -- Folds 99 | -- Folded = { bg = colors.mantle }, 100 | Folded = { bg = ucolors.darken(colors.peach, 0.1, colors.base) }, 101 | 102 | -- Matching Parenthesis 103 | -- MatchParen = { style = { 'underline' } }, 104 | -- MatchParen = { bg = colors.none }, 105 | -- MatchParen = { fg = colors.base, bg = colors.red }, 106 | -- MatchParen = { fg = colors.base, bg = ucolors.darken(colors.red, 0.65, colors.rosewater) }, 107 | 108 | -- Inlay hints 109 | -- LspInlayHint = { bg = colors.mantle }, 110 | 111 | -- Lsp diagnostic virtual text 112 | DiagnosticVirtualTextError = { bg = ucolors.darken(colors.red, 0.095, colors.base) }, 113 | DiagnosticVirtualTextWarn = { bg = ucolors.darken(colors.yellow, 0.095, colors.base) }, 114 | DiagnosticVirtualTextHint = { bg = ucolors.darken(colors.teal, 0.095, colors.base) }, 115 | DiagnosticVirtualTextInfo = { bg = ucolors.darken(colors.sky, 0.095, colors.base) }, 116 | 117 | -- Neotree 118 | NeoTreeRootName = { fg = colors.pink, style = { 'bold', 'italic' } }, 119 | NeoTreeGitAdded = { fg = colors.green, style = { 'italic' } }, 120 | NeoTreeGitConflict = { fg = colors.red, style = { 'italic' } }, 121 | NeoTreeGitDeleted = { fg = colors.red, style = { 'italic' } }, 122 | NeoTreeGitIgnored = { fg = colors.overlay0, style = { 'italic' } }, 123 | NeoTreeGitModified = { fg = colors.yellow, style = { 'italic' } }, 124 | NeoTreeGitUnstaged = { fg = colors.red, style = { 'italic' } }, 125 | NeoTreeGitUntracked = { fg = colors.teal, style = { 'italic' } }, 126 | NeoTreeGitStaged = { fg = colors.green, style = { 'italic' } }, 127 | 128 | -- Dashboard.nvim 129 | DashboardHeader = { fg = colors.yellow, style = { 'bold', 'italic' } }, 130 | 131 | -- Treesitter Context 132 | TreesitterContext = { bg = ucolors.darken(colors.base, 0.55, colors.mantle) }, 133 | TreesitterContextBottom = { sp = colors.surface1 }, 134 | TreesitterContextLineNumber = { 135 | fg = colors.rosewater, 136 | bg = ucolors.darken(colors.base, 0.55, colors.mantle), 137 | }, 138 | 139 | -- Visual Mode 140 | Visual = { bg = ucolors.darken(colors.mauve, 0.15, colors.base) }, 141 | 142 | -- Vim Visual Multi 143 | -- VM_Mono = { bg = ucolors.darken('#f38ba8', 0.15, colors.mantle), fg = colors.red, style = { 'bold' } }, 144 | 145 | -- Noice CMDLine Popup 146 | -- NoiceCmdlinePopupBorder = { fg = colors.red }, 147 | 148 | -- Gitsigns 149 | GitSignsStagedAdd = { fg = colors.blue }, 150 | 151 | -- Search 152 | CurSearch = { bg = ucolors.darken(colors.lavender, 0.65, colors.base), fg = colors.mantle }, 153 | 154 | -- Lazy.nvim 155 | LazyButton = { bg = colors.mantle }, 156 | 157 | -- Mason 158 | MasonHeader = { bg = colors.mauve, fg = colors.mantle }, 159 | MasonHighlightBlockBold = { bg = colors.blue, fg = colors.mantle }, 160 | MasonMutedBlock = { bg = colors.surface0, fg = colors.text }, 161 | 162 | -- blink.cmp 163 | BlinkCmpMenuSelection = { fg = colors.base, bg = colors.lavender, style = { 'bold', 'italic' } }, 164 | BlinkCmpMenuBorder = { fg = colors.blue }, 165 | BlinkCmpDocBorder = { fg = colors.sapphire }, 166 | BlinkCmpSignatureHelpBorder = { fg = colors.yellow }, 167 | 168 | -- mini.indentscope 169 | MiniIndentscopeSymbol = { fg = colors.blue }, 170 | } 171 | end, 172 | highlight_overrides = {}, 173 | color_overrides = { 174 | latte = { 175 | rosewater = '#B5485E', 176 | flamingo = '#c64444', 177 | pink = '#d3008b', 178 | mauve = '#8839EF', 179 | red = '#c10000', 180 | maroon = '#550000', 181 | peach = '#975151', 182 | yellow = '#7b6200', 183 | green = '#005a32', 184 | teal = '#008080', 185 | sky = '#1987b2', 186 | sapphire = '#2e42b8', 187 | blue = '#034079', 188 | lavender = '#5a189a', 189 | text = '#4c5069', 190 | subtext1 = '#5c6077', 191 | subtext0 = '#6c6f85', 192 | overlay2 = '#7c7f93', 193 | overlay1 = '#8c8fa1', 194 | overlay0 = '#9ca0b0', 195 | surface2 = '#acb0be', 196 | surface1 = '#bcc0cc', 197 | surface0 = '#ccd0da', 198 | base = '#eff1f5', 199 | mantle = '#e6e9ef', 200 | crust = '#dce0e8', 201 | }, 202 | }, 203 | }) 204 | -------------------------------------------------------------------------------- /lua/plugins/toggleterm.lua: -------------------------------------------------------------------------------- 1 | return { 2 | 'akinsho/toggleterm.nvim', 3 | version = '*', 4 | keys = { 5 | { 'tt', 'ToggleTerm', desc = 'ToggleTerm' }, 6 | }, 7 | config = true, 8 | opts = { 9 | direction = 'float', 10 | }, 11 | } 12 | -------------------------------------------------------------------------------- /lua/plugins/treesitter.lua: -------------------------------------------------------------------------------- 1 | return { 2 | -- ──────────────────────── TREESITTER ───────────────────── 3 | { 4 | 'nvim-treesitter/nvim-treesitter', 5 | event = { 'BufReadPre', 'BufNewFile' }, 6 | build = ':TSUpdate', 7 | dependencies = { 8 | -- ────────────────────── TS TEXTOBJECTS ─────────────────── 9 | { 'nvim-treesitter/nvim-treesitter-textobjects' }, 10 | -- ─────────────────────── TS TREEHOPPER ─────────────────────── 11 | { 'mfussenegger/nvim-treehopper' }, 12 | -- ──────────────────────── TS CONTEXT ───────────────────── 13 | { 14 | 'nvim-treesitter/nvim-treesitter-context', 15 | opts = { 16 | max_lines = '10%', 17 | }, 18 | }, 19 | }, 20 | config = function() 21 | require('nvim-treesitter.configs').setup({ 22 | ensure_installed = { 23 | 'bash', 24 | 'bibtex', 25 | 'gitcommit', 26 | 'comment', 27 | 'cpp', 28 | 'css', 29 | 'csv', 30 | 'html', 31 | 'http', 32 | 'java', 33 | 'javascript', 34 | 'jsdoc', 35 | 'json', 36 | 'json5', 37 | 'latex', 38 | 'lua', 39 | 'markdown', 40 | 'markdown_inline', 41 | 'make', 42 | 'php', 43 | 'python', 44 | 'query', 45 | 'regex', 46 | 'rust', 47 | 'scss', 48 | 'sql', 49 | 'toml', 50 | 'typescript', 51 | 'typst', 52 | 'vim', 53 | 'vimdoc', 54 | 'vue', 55 | 'yaml', 56 | }, 57 | highlight = { 58 | enable = true, 59 | }, 60 | -- Buildin 61 | incremental_selection = { 62 | enable = true, 63 | keymaps = { 64 | init_selection = '', 65 | scope_incremental = '', 66 | node_incremental = '', 67 | node_decremental = '', 68 | }, 69 | }, 70 | -- Textobjects 71 | textobjects = { 72 | select = { 73 | enable = true, 74 | lookahead = true, 75 | keymaps = { 76 | ['af'] = { query = '@function.outer', desc = 'outer function' }, 77 | ['if'] = { query = '@function.inner', desc = 'inner function' }, 78 | ['ac'] = { query = '@conditional.outer', desc = 'outer conditional' }, 79 | ['ic'] = { query = '@conditional.inner', desc = 'inner conditional' }, 80 | ['al'] = { query = '@loop.outer', desc = 'outer loop' }, 81 | ['il'] = { query = '@loop.inner', desc = 'inner loop' }, 82 | ['am'] = { query = '@statement.outer', desc = 'outer statement' }, 83 | ['ix'] = { query = '@comment.outer', desc = 'comment' }, 84 | }, 85 | include_surrounding_whitespace = false, 86 | }, 87 | swap = { 88 | enable = true, 89 | swap_next = { 90 | ['s'] = { query = '@parameter.inner', desc = 'Swap next parameters' }, 91 | }, 92 | swap_previous = { 93 | ['S'] = { query = '@parameter.inner', desc = 'Swap previous parameters' }, 94 | }, 95 | }, 96 | }, 97 | }) 98 | end, 99 | }, 100 | -- ──────────────────────── TS AUTOTAG ───────────────────── 101 | { 102 | 'windwp/nvim-ts-autotag', 103 | event = { 'BufReadPre', 'BufNewFile' }, 104 | opts = {}, 105 | }, 106 | -- ────────────────────── TS NODE ACTION ─────────────────── 107 | { 108 | 'ckolkey/ts-node-action', 109 | keys = { 110 | { '+', 'NodeAction', desc = 'Trigger Node Action' }, 111 | }, 112 | opts = {}, 113 | }, 114 | } 115 | -------------------------------------------------------------------------------- /lua/plugins/treewalker.lua: -------------------------------------------------------------------------------- 1 | return { 2 | 'aaronik/treewalker.nvim', 3 | -- The following options are the defaults. 4 | -- Treewalker aims for sane defaults, so these are each individually optional, 5 | -- and setup() does not need to be called, so the whole opts block is optional as well. 6 | keys = { 7 | { '', 'Treewalker Up', mode = { 'n', 'v' }, desc = 'Treewalker Up' }, 8 | { '', 'Treewalker Down', mode = { 'n', 'v' }, desc = 'Treewalker Down' }, 9 | { '', 'Treewalker Left', mode = { 'n', 'v' }, desc = 'Treewalker Left' }, 10 | { '', 'Treewalker Right', mode = { 'n', 'v' }, desc = 'Treewalker Right' }, 11 | { '', 'Treewalker SwapDown', desc = 'Treewalker Swap Up' }, 12 | { '', 'Treewalker SwapUp', desc = 'Treewalker Swap Up' }, 13 | { '', 'Treewalker SwapLeft', desc = 'Treewalker Swap Left' }, 14 | { '', 'Treewalker SwapRight', desc = 'Treewalker Swap Right' }, 15 | }, 16 | opts = { 17 | -- Whether to briefly highlight the node after jumping to it 18 | highlight = true, 19 | 20 | -- How long should above highlight last (in ms) 21 | highlight_duration = 250, 22 | 23 | -- The color of the above highlight. Must be a valid vim highlight group. 24 | -- (see :h highlight-group for options) 25 | highlight_group = 'CursorLine', 26 | }, 27 | } 28 | -------------------------------------------------------------------------------- /lua/plugins/trouble.lua: -------------------------------------------------------------------------------- 1 | return { 2 | 'folke/trouble.nvim', 3 | keys = { 4 | { 'xx', 'Trouble diagnostics toggle', desc = 'Diagnostics (Trouble)' }, 5 | { 'xX', 'Trouble diagnostics toggle filter.buf=0', desc = 'Buffer Diagnostics (Trouble)' }, 6 | { 'xs', 'Trouble symbols toggle', desc = 'Symbols (Trouble)' }, 7 | { 8 | 'xr', 9 | 'Trouble lsp toggle win.position=right', 10 | desc = 'LSP Definitions / references / ... (Trouble)', 11 | }, 12 | { 'xl', 'Trouble loclist toggle', desc = 'Location List (Trouble)' }, 13 | { 'xq', 'Trouble qflist toggle', desc = 'Quickfix List (Trouble)' }, 14 | { 'xt', 'Trouble todo', desc = 'Todo Trouble' }, 15 | }, 16 | opts = { 17 | focus = true, 18 | }, 19 | } 20 | -------------------------------------------------------------------------------- /lua/plugins/typst-preview.lua: -------------------------------------------------------------------------------- 1 | return { 2 | 'chomosuke/typst-preview.nvim', 3 | ft = 'typst', 4 | version = '1.*', 5 | opts = { 6 | invert_colors = 'auto', 7 | }, 8 | } 9 | -------------------------------------------------------------------------------- /lua/plugins/ufo.lua: -------------------------------------------------------------------------------- 1 | return { 2 | 'kevinhwang91/nvim-ufo', 3 | event = 'BufRead', 4 | keys = { 5 | { 6 | 'zR', 7 | function() 8 | require('ufo').openAllFolds() 9 | end, 10 | }, 11 | { 12 | 'zM', 13 | function() 14 | require('ufo').closeAllFolds() 15 | end, 16 | }, 17 | }, 18 | dependencies = { 19 | 'kevinhwang91/promise-async', 20 | }, 21 | config = function() 22 | -- vim.o.foldcolumn = '1' 23 | -- vim.o.foldlevel = 99 24 | -- vim.o.foldlevelstart = 99 25 | -- vim.o.foldenable = true 26 | local handler = function(virtText, lnum, endLnum, width, truncate) 27 | local newVirtText = {} 28 | local suffix = (' 󰁂 %d '):format(endLnum - lnum) --  󰁂 29 | local sufWidth = vim.fn.strdisplaywidth(suffix) 30 | local targetWidth = width - sufWidth 31 | local curWidth = 0 32 | for _, chunk in ipairs(virtText) do 33 | local chunkText = chunk[1] 34 | local chunkWidth = vim.fn.strdisplaywidth(chunkText) 35 | if targetWidth > curWidth + chunkWidth then 36 | table.insert(newVirtText, chunk) 37 | else 38 | chunkText = truncate(chunkText, targetWidth - curWidth) 39 | local hlGroup = chunk[2] 40 | table.insert(newVirtText, { chunkText, hlGroup }) 41 | chunkWidth = vim.fn.strdisplaywidth(chunkText) 42 | -- str width returned from truncate() may less than 2nd argument, need padding 43 | if curWidth + chunkWidth < targetWidth then 44 | suffix = suffix .. (' '):rep(targetWidth - curWidth - chunkWidth) 45 | end 46 | break 47 | end 48 | curWidth = curWidth + chunkWidth 49 | end 50 | table.insert(newVirtText, { suffix, 'MoreMsg' }) 51 | return newVirtText 52 | end 53 | require('ufo').setup({ 54 | fold_virt_text_handler = handler, 55 | provider_selector = function(bufnr, filetype, buftype) 56 | return { 'treesitter', 'indent' } 57 | end, 58 | }) 59 | end, 60 | } 61 | -------------------------------------------------------------------------------- /lua/plugins/ultimate-autopair.lua: -------------------------------------------------------------------------------- 1 | return { 2 | 'altermo/ultimate-autopair.nvim', 3 | enabled = false, 4 | event = { 'InsertEnter', 'CmdlineEnter' }, 5 | branch = 'v0.6', --recomended as each new version will have breaking changes 6 | opts = {}, 7 | } 8 | -------------------------------------------------------------------------------- /lua/plugins/vim-rest-console.lua: -------------------------------------------------------------------------------- 1 | return { 2 | 'diepm/vim-rest-console', 3 | enabled = false, 4 | ft = 'rest', 5 | } 6 | -------------------------------------------------------------------------------- /lua/plugins/vim-visual-multi.lua: -------------------------------------------------------------------------------- 1 | return { 2 | 'mg979/vim-visual-multi', 3 | enabled = false, 4 | branch = 'master', 5 | keys = { 6 | { '' }, 7 | { '' }, 8 | { '' }, 9 | { '' }, 10 | { '' }, 11 | { 'cp', 'vip(VM-Visual-Cursors)', desc = 'Create multicursors inner paragraph' }, 12 | { '', ':VMSearch', mode = 'x', desc = 'Search & create multicursors in visual mode' }, 13 | { '', ':%VMSearch', desc = 'Search & create multicursors' }, 14 | { '', '(VM-Visual-Cursors)', mode = 'x', desc = 'Create multicursors in visual mode' }, 15 | }, 16 | init = function() 17 | vim.g.VM_maps = { 18 | ['Motion ,'] = '', 19 | ['Select l'] = '', 20 | ['Select h'] = '', 21 | ['Goto Next'] = '', 22 | ['Goto Prev'] = '', 23 | ['I BS'] = '', 24 | } 25 | -- Themes: 'codedark' | 'iceblue' | 'purplegray' | 'nord' | 'sand' | 'ocean' | 'olive' | 'spacesray' 26 | -- vim.g.VM_theme = 'ocean' 27 | end, 28 | } 29 | -------------------------------------------------------------------------------- /lua/plugins/vimtex.lua: -------------------------------------------------------------------------------- 1 | return { 2 | 'lervag/vimtex', 3 | ft = 'tex', 4 | init = function() 5 | vim.g.vimtex_view_method = 'skim' 6 | end, 7 | } 8 | -------------------------------------------------------------------------------- /lua/plugins/web_devicons.lua: -------------------------------------------------------------------------------- 1 | return { 2 | 'nvim-tree/nvim-web-devicons', 3 | lazy = true, 4 | config = function() 5 | require('nvim-web-devicons').set_icon({ 6 | toc = { 7 | icon = '󰎟', 8 | color = '#dee0cd', 9 | cterm_color = '86', 10 | name = 'Toc', 11 | }, 12 | typ = { 13 | icon = 't', 14 | color = '#239DAD', 15 | cterm_color = '45', 16 | name = 'Typst', 17 | }, 18 | }) 19 | end, 20 | } 21 | -------------------------------------------------------------------------------- /lua/plugins/which-key.lua: -------------------------------------------------------------------------------- 1 | return { 2 | 'folke/which-key.nvim', 3 | event = 'VeryLazy', 4 | enabled = true, 5 | opts = { 6 | preset = 'helix', 7 | expand = 0, 8 | spec = { 9 | { 10 | mode = { 'n', 'v' }, 11 | { 'gr', group = '+LSP Functions' }, 12 | { 'grw', group = '+LSP Workspace Folders' }, 13 | { 'c', group = '+Comment-Box / Context Treesitter' }, -- Comment Box 14 | { 'd', group = '+Diffview / Debug' }, -- Diffview & nvim-dap 15 | { 'ds', group = '+Dap Step' }, -- nvim-dap step 16 | { 'f', group = '+File' }, -- Telescope 17 | { 'g', group = '+Git' }, -- Git 18 | { 'h', group = '+Hop Motion' }, -- Hop 19 | { 'l', group = '+Lazy', icon = '💤' }, -- Lazy & LTeX 20 | { 'm', group = '+Show Minimap' }, -- Codewindow.nvim 21 | { 't', group = '+ToggleTerm / Todo Comments' }, -- ToggleTerm & Todo Comments 22 | { 'b', group = '+Buffer' }, -- Bufferline.nvim 23 | { 'g', group = '+Glance LSP' }, -- Glance LSP locations 24 | { 'i', group = '+IncRename / Inlay Hints' }, -- IncRename 25 | { 'n', group = '+Noice' }, -- Noice.nvim 26 | { 'x', group = '+Trouble' }, -- Trouble.nvim 27 | }, 28 | }, 29 | win = { 30 | border = 'single', 31 | no_overlap = false, 32 | title_pos = 'center', 33 | }, 34 | sort = { 'manual', 'group', 'lower' }, 35 | }, 36 | } 37 | -------------------------------------------------------------------------------- /lua/plugins/yanky.lua: -------------------------------------------------------------------------------- 1 | return { 2 | 'gbprod/yanky.nvim', 3 | enabled = true, 4 | keys = { 5 | { 'y', 'YankyRingHistory', mode = { 'n', 'x' }, desc = 'Yank Ring History (Yanky)' }, 6 | { 'y', '(YankyYank)', mode = { 'n', 'x' }, desc = 'Yank (Yanky)' }, 7 | { 'p', '(YankyPutAfter)', mode = { 'n', 'x' }, desc = 'Put After (Yanky)' }, 8 | { 'P', '(YankyPutBefore)', mode = { 'n', 'x' }, desc = 'Put Before (Yanky)' }, 9 | { 'gp', '(YankyGPutAfter)', mode = { 'n', 'x' }, desc = 'GPut After (Yanky)' }, 10 | { 'gP', '(YankyGPutBefore)', mode = { 'n', 'x' }, desc = 'GPut Before (Yanky)' }, 11 | -- { 'y', '(YankyCycleForward)', desc = 'Cycle Forward (Yanky)' }, 12 | -- { 'y', '(YankyCycleBackward)', desc = 'Cycle Backward (Yanky)' }, 13 | -- { 'p', '(YankyPutIndentAfterLinewise)', desc = 'Put Indent After Linewise (Yanky)' }, 14 | -- { 'p', '(YankyPutIndentBeforeLinewise)', desc = 'Put Indent Before Linewise (Yanky)' }, 15 | -- { 'P', '(YankyPutIndentAfterLinewise)', desc = 'Put Indent After Linewise (Yanky)' }, 16 | { 'P', '(YankyPutIndentBeforeLinewise)', desc = 'Put Indent Before Linewise (Yanky)' }, 17 | { '>p', '(YankyPutIndentAfterShiftRight)', desc = 'Put Indent After Shift Right (Yanky)' }, 18 | { '(YankyPutIndentAfterShiftLeft)', desc = 'Put Indent After Shift Left (Yanky)' }, 19 | { '>P', '(YankyPutIndentBeforeShiftRight)', desc = 'Put Indent Before Shift Right (Yanky)' }, 20 | { '(YankyPutIndentBeforeShiftLeft)', desc = 'Put Indent Before Shift Left (Yanky)' }, 21 | { '=p', '(YankyPutAfterFilter)', desc = 'Put After Filter (Yanky)' }, 22 | { '=P', '(YankyPutBeforeFilter)', desc = 'Put Before Filter (Yanky)' }, 23 | }, 24 | opts = { 25 | highlight = { 26 | on_put = true, 27 | on_yank = true, 28 | timer = 100, 29 | }, 30 | }, 31 | } 32 | -------------------------------------------------------------------------------- /lua/plugins/zen-mode.lua: -------------------------------------------------------------------------------- 1 | return { 2 | 'folke/zen-mode.nvim', 3 | keys = { 4 | { 'z', 'ZenMode', desc = 'Zen Mode' }, 5 | }, 6 | opts = { 7 | window = { 8 | backdrop = 1, 9 | width = 0.8, 10 | height = 0.9, 11 | options = { 12 | signcolumn = 'no', 13 | number = false, 14 | relativenumber = false, 15 | cursorline = false, 16 | cursorcolumn = false, 17 | foldcolumn = '0', 18 | list = false, 19 | }, 20 | }, 21 | plugins = { 22 | gitsigns = { enabled = true }, 23 | }, 24 | on_open = function(win) 25 | vim.o.cmdheight = 1 26 | vim.b.miniindentscope_disable = true 27 | require('ibl').setup({ 28 | enabled = false, 29 | }) 30 | end, 31 | on_close = function() 32 | vim.o.cmdheight = 0 33 | vim.b.miniindentscope_disable = false 34 | require('ibl').setup({ 35 | indent = { 36 | char = '│', 37 | repeat_linebreak = false, 38 | }, 39 | scope = { 40 | enabled = false, 41 | }, 42 | }) 43 | end, 44 | }, 45 | } 46 | -------------------------------------------------------------------------------- /lua/utils/check_appearence.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | M.manual_override = nil 4 | 5 | function M.set_background() 6 | if M.manual_override ~= nil then 7 | if M.manual_override then 8 | vim.o.background = 'dark' 9 | else 10 | vim.o.background = 'light' 11 | end 12 | return 13 | end 14 | 15 | local handle = io.popen('defaults read -g AppleInterfaceStyle 2>/dev/null') 16 | if handle then 17 | local result = handle:read('*a') 18 | handle:close() 19 | if result:match('Dark') then 20 | vim.o.background = 'dark' 21 | else 22 | vim.o.background = 'light' 23 | end 24 | else 25 | vim.o.background = 'light' -- Fallback in case of error 26 | end 27 | end 28 | 29 | function M.toggle_theme() 30 | if M.manual_override == nil then 31 | M.manual_override = vim.o.background == 'light' 32 | else 33 | M.manual_override = not M.manual_override 34 | end 35 | 36 | if M.manual_override then 37 | vim.o.background = 'dark' 38 | vim.cmd('Catppuccin mocha') 39 | else 40 | vim.o.background = 'light' 41 | vim.cmd('Catppuccin latte') 42 | end 43 | end 44 | 45 | function M.watch_macos_appearance() 46 | local uv = vim.loop 47 | local config_path = os.getenv('HOME') .. '/Library/Preferences/.GlobalPreferences.plist' 48 | 49 | local watcher = uv.new_fs_event() 50 | if watcher then 51 | watcher:start(config_path, {}, function() 52 | vim.schedule(M.set_background) 53 | end) 54 | end 55 | end 56 | 57 | M.set_background() 58 | 59 | M.watch_macos_appearance() 60 | 61 | vim.api.nvim_create_user_command('ToggleTheme', M.toggle_theme, {}) 62 | 63 | return M 64 | -------------------------------------------------------------------------------- /lua/utils/init.lua: -------------------------------------------------------------------------------- 1 | require('utils.check_appearence') 2 | require('utils.spelling') 3 | require('utils.spell_add_menu') 4 | require('utils.ltex_lang') 5 | -------------------------------------------------------------------------------- /lua/utils/ltex_lang.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | function M.set_ltex_lang(lang) 4 | local clients = vim.lsp.get_clients({ bufnr = 0 }) 5 | for _, client in ipairs(clients) do 6 | if client.name == 'ltex_plus' or 'ltex' then 7 | vim.notify('LTeX-Language: ' .. lang, vim.log.levels.INFO, { 8 | title = 'LTeX Language', 9 | timeout = 2000, 10 | }) 11 | client.config.settings.ltex.language = lang 12 | vim.lsp.buf_notify(0, 'workspace/didChangeConfiguration', { 13 | settings = client.config.settings, 14 | }) 15 | return 16 | end 17 | end 18 | vim.notify('No LTeX-Client active.', vim.log.levels.ERROR, { 19 | title = 'LTeX Language', 20 | timeout = 2000, 21 | }) 22 | end 23 | 24 | function M.select_lang_menu() 25 | local languages = { 26 | ['German'] = 'de', 27 | ['English'] = 'en', 28 | ['Greek'] = 'el', 29 | } 30 | 31 | vim.ui.select(vim.tbl_keys(languages), { 32 | prompt = 'Choose a LTeX language:', 33 | }, function(choice) 34 | if choice then 35 | M.set_ltex_lang(languages[choice]) 36 | end 37 | end) 38 | end 39 | 40 | vim.api.nvim_create_user_command('LtexLangMenu', function() 41 | M.select_lang_menu() 42 | end, { 43 | desc = 'Language for LTeX (de/en/el)', 44 | }) 45 | 46 | return M 47 | -------------------------------------------------------------------------------- /lua/utils/set_keymap.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | function M.set(opts) 4 | local mode = opts.mode or 'n' 5 | local bufnr = opts.bufnr or 0 6 | local expr = opts.expr or false 7 | 8 | vim.keymap.set(mode, opts.key, opts.cmd, { 9 | expr = expr, 10 | buffer = bufnr, 11 | noremap = true, 12 | silent = true, 13 | desc = opts.desc, 14 | }) 15 | end 16 | 17 | return M 18 | -------------------------------------------------------------------------------- /lua/utils/spell_add_menu.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | local function get_add_path() 4 | local lang = vim.opt.spelllang:get()[1] or 'de' 5 | return vim.fn.stdpath('config') .. '/spell/' .. lang .. '.utf-8.add' 6 | end 7 | 8 | local function read_words(path) 9 | local f = io.open(path, 'r') 10 | if not f then 11 | return {} 12 | end 13 | local lines = {} 14 | for line in f:lines() do 15 | if line ~= '' then 16 | table.insert(lines, line) 17 | end 18 | end 19 | f:close() 20 | return lines 21 | end 22 | 23 | local function write_words(path, words) 24 | local f = io.open(path, 'w') 25 | for _, word in ipairs(words) do 26 | f:write(word .. '\n') 27 | end 28 | f:close() 29 | vim.notify(' Wörter aktualisiert: ' .. path, vim.log.levels.INFO) 30 | end 31 | 32 | M.manage_user_words = function() 33 | local path = get_add_path() 34 | local words = read_words(path) 35 | 36 | if #words == 0 then 37 | vim.notify('󰶌 Keine Benutzerwörter gefunden.', vim.log.levels.ERROR) 38 | return 39 | end 40 | 41 | vim.ui.select(words, { prompt = '󰧑 Benutzerwörter verwalten:' }, function(choice) 42 | if not choice then 43 | return 44 | end 45 | 46 | vim.ui.select({ ' Löschen', ' Ändern', '󰅌 In Zwischenablage' }, { 47 | prompt = 'Was tun mit: ' .. choice, 48 | }, function(action) 49 | if action == ' Löschen' then 50 | -- Entferne das Wort 51 | local updated = vim.tbl_filter(function(w) 52 | return w ~= choice 53 | end, words) 54 | write_words(path, updated) 55 | elseif action == ' Ändern' then 56 | vim.ui.input({ prompt = 'Neues Wort für: ' .. choice }, function(new_word) 57 | if new_word and new_word ~= '' then 58 | local updated = {} 59 | for _, w in ipairs(words) do 60 | table.insert(updated, w == choice and new_word or w) 61 | end 62 | write_words(path, updated) 63 | end 64 | end) 65 | elseif action == '󰅌 In Zwischenablage' then 66 | vim.fn.setreg('+', choice) 67 | vim.notify("󰅌 '" .. choice .. "' in Zwischenablage", vim.log.levels.INFO) 68 | end 69 | end) 70 | end) 71 | end 72 | 73 | vim.api.nvim_create_user_command('SpellWordsManage', M.manage_user_words, {}) 74 | 75 | return M 76 | -------------------------------------------------------------------------------- /lua/utils/spelling.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | local spell_options = { 4 | { label = '🇩🇪 German', langs = { 'de' } }, 5 | { label = '🇬🇧 English', langs = { 'en' } }, 6 | { label = '🇩🇪 + 🇬🇧 German + English', langs = { 'de', 'en' } }, 7 | { label = '🇬🇷 Greek', langs = { 'el' } }, 8 | } 9 | 10 | M.choose_spelllang = function() 11 | local labels = vim.tbl_map(function(opt) 12 | return opt.label 13 | end, spell_options) 14 | 15 | vim.ui.select(labels, { prompt = '󰓆 Choose spelling' }, function(choice) 16 | for _, opt in ipairs(spell_options) do 17 | if opt.label == choice then 18 | vim.opt.spell = true 19 | vim.opt.spelllang = opt.langs 20 | vim.notify('󰓆 Active spelling: ' .. table.concat(opt.langs, ', '), vim.log.levels.WARN) 21 | return 22 | end 23 | end 24 | end) 25 | end 26 | 27 | vim.api.nvim_create_user_command('SpelllangSelect', M.choose_spelllang, {}) 28 | 29 | return M 30 | -------------------------------------------------------------------------------- /lua/utils/split.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | M.max_or_equal = function() 4 | local winwidth = vim.fn.winwidth(vim.api.nvim_get_current_win()) 5 | if winwidth <= vim.o.columns / 2 then 6 | vim.cmd('wincmd|') 7 | else 8 | vim.cmd('wincmd=') 9 | end 10 | end 11 | 12 | return M 13 | -------------------------------------------------------------------------------- /snippets/lua.json: -------------------------------------------------------------------------------- 1 | { 2 | "config function": { 3 | "prefix": "conff", 4 | "body": ["config = function()", "\t$0", "end"], 5 | "description": "Config function" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /spell/de.utf-8.spl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilias777/nvim/b8e3ce0f656f58186ef409108a876355af68e457/spell/de.utf-8.spl -------------------------------------------------------------------------------- /spell/de.utf-8.sug: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilias777/nvim/b8e3ce0f656f58186ef409108a876355af68e457/spell/de.utf-8.sug -------------------------------------------------------------------------------- /spell/el.utf-8.spl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilias777/nvim/b8e3ce0f656f58186ef409108a876355af68e457/spell/el.utf-8.spl -------------------------------------------------------------------------------- /spell/el.utf-8.sug: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilias777/nvim/b8e3ce0f656f58186ef409108a876355af68e457/spell/el.utf-8.sug -------------------------------------------------------------------------------- /spell/en.utf-8.spl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilias777/nvim/b8e3ce0f656f58186ef409108a876355af68e457/spell/en.utf-8.spl -------------------------------------------------------------------------------- /spell/en.utf-8.sug: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilias777/nvim/b8e3ce0f656f58186ef409108a876355af68e457/spell/en.utf-8.sug --------------------------------------------------------------------------------