From f1430fa64d58fe346dd19b8e24f795ced4fcebbc Mon Sep 17 00:00:00 2001 From: aleidk Date: Thu, 22 May 2025 10:46:07 -0400 Subject: [PATCH 1/2] remove unecesary neovim plugins for basic text editing --- .../lua/aleidk/plugins/bookmarks.lua | 4 -- .../lua/aleidk/plugins/database.lua | 44 ------------------- .../lua/aleidk/plugins/indent-blankline.lua | 30 ------------- .../lua/aleidk/plugins/remote-sshfs.lua | 7 --- .../lua/aleidk/plugins/typescript-tools.lua | 18 -------- 5 files changed, 103 deletions(-) delete mode 100644 Configs/nvim_unstable/.config/nvim_unstable/lua/aleidk/plugins/database.lua delete mode 100644 Configs/nvim_unstable/.config/nvim_unstable/lua/aleidk/plugins/indent-blankline.lua delete mode 100644 Configs/nvim_unstable/.config/nvim_unstable/lua/aleidk/plugins/remote-sshfs.lua delete mode 100644 Configs/nvim_unstable/.config/nvim_unstable/lua/aleidk/plugins/typescript-tools.lua diff --git a/Configs/nvim_unstable/.config/nvim_unstable/lua/aleidk/plugins/bookmarks.lua b/Configs/nvim_unstable/.config/nvim_unstable/lua/aleidk/plugins/bookmarks.lua index a68f973..fe3a1a2 100644 --- a/Configs/nvim_unstable/.config/nvim_unstable/lua/aleidk/plugins/bookmarks.lua +++ b/Configs/nvim_unstable/.config/nvim_unstable/lua/aleidk/plugins/bookmarks.lua @@ -15,10 +15,6 @@ return { }, lazy = false, cmd = "Grapple", - config = function() - local telescope = require("telescope") - telescope.load_extension("grapple") - end, keys = { { "a", "Grapple toggle", desc = "Toggle bookmark for current file" }, { "D", "Grapple reset", desc = "Delete all bookmarks" }, diff --git a/Configs/nvim_unstable/.config/nvim_unstable/lua/aleidk/plugins/database.lua b/Configs/nvim_unstable/.config/nvim_unstable/lua/aleidk/plugins/database.lua deleted file mode 100644 index 175697b..0000000 --- a/Configs/nvim_unstable/.config/nvim_unstable/lua/aleidk/plugins/database.lua +++ /dev/null @@ -1,44 +0,0 @@ -return { - "kristijanhusak/vim-dadbod-ui", - dependencies = { - { "tpope/vim-dadbod", lazy = true }, - { "kristijanhusak/vim-dadbod-completion", ft = { "sql", "mysql", "plsql" }, lazy = true }, - }, - cmd = { - "DBUI", - "DBUIToggle", - "DBUIAddConnection", - "DBUIFindBuffer", - }, - keys = { - { "ud", "DBUIToggle", desc = "Toggle DB UI" }, - }, - init = function() - -- Your DBUI configuration - vim.g.db_ui_use_nerd_fonts = 1 - vim.g.db_ui_force_echo_notifications = 1 - - vim.api.nvim_create_autocmd("FileType", { - pattern = { - "sql", - "mysql", - "plsql", - }, - command = [[setlocal omnifunc=vim_dadbod_completion#omni]], - }) - - vim.api.nvim_create_autocmd("FileType", { - pattern = { - "sql", - "mysql", - "plsql", - }, - callback = function() - ---@diagnostic disable-next-line: missing-fields - require("cmp").setup.buffer({ - sources = { { name = "vim-dadbod-completion" }, { name = "buffer" } }, - }) - end, - }) - end, -} diff --git a/Configs/nvim_unstable/.config/nvim_unstable/lua/aleidk/plugins/indent-blankline.lua b/Configs/nvim_unstable/.config/nvim_unstable/lua/aleidk/plugins/indent-blankline.lua deleted file mode 100644 index f529305..0000000 --- a/Configs/nvim_unstable/.config/nvim_unstable/lua/aleidk/plugins/indent-blankline.lua +++ /dev/null @@ -1,30 +0,0 @@ -return { - -- Add indentation guides even on blank lines - "lukas-reineke/indent-blankline.nvim", - dependencies = { "nvim-treesitter/nvim-treesitter" }, - main = "ibl", - opts = { - -- char = "▏", - indent = { - char = "│", - tab_char = "│", - }, - scope = { - enabled = true, - }, - exclude = { - filetypes = { - "help", - "alpha", - "dashboard", - "neo-tree", - "Trouble", - "lazy", - "mason", - "notify", - "toggleterm", - "lazyterm", - }, - }, - }, -} diff --git a/Configs/nvim_unstable/.config/nvim_unstable/lua/aleidk/plugins/remote-sshfs.lua b/Configs/nvim_unstable/.config/nvim_unstable/lua/aleidk/plugins/remote-sshfs.lua deleted file mode 100644 index 8c11bc1..0000000 --- a/Configs/nvim_unstable/.config/nvim_unstable/lua/aleidk/plugins/remote-sshfs.lua +++ /dev/null @@ -1,7 +0,0 @@ -return { - { - "nosduco/remote-sshfs.nvim", - dependencies = { "nvim-telescope/telescope.nvim" }, - cmd = { "RemoteSSHFSConnect" }, - }, -} diff --git a/Configs/nvim_unstable/.config/nvim_unstable/lua/aleidk/plugins/typescript-tools.lua b/Configs/nvim_unstable/.config/nvim_unstable/lua/aleidk/plugins/typescript-tools.lua deleted file mode 100644 index 7f106b0..0000000 --- a/Configs/nvim_unstable/.config/nvim_unstable/lua/aleidk/plugins/typescript-tools.lua +++ /dev/null @@ -1,18 +0,0 @@ -return { - "pmizio/typescript-tools.nvim", - dependencies = { "nvim-lua/plenary.nvim", "neovim/nvim-lspconfig" }, - opts = { - init_options = { - preferences = { - disableSuggestions = true, - }, - }, - settings = { - -- array of strings("fix_all"|"add_missing_imports"|"remove_unused"| - -- "remove_unused_imports"|"organize_imports") -- or string "all" - -- to include all supported code actions - -- specify commands exposed as code_actions - expose_as_code_action = "all", - }, - }, -} From a6c0b4b86787d100dba7d9c56726595c630fbe66 Mon Sep 17 00:00:00 2001 From: aleidk Date: Thu, 22 May 2025 10:55:13 -0400 Subject: [PATCH 2/2] promote nvim_unstable --- Configs/nvim/.config/nvim/init.lua | 36 +++- Configs/nvim/.config/nvim/lazy-lock.json | 33 +--- .../nvim/.config/nvim/lua/aleidk/autocmds.lua | 42 +++- .../nvim/.config/nvim/lua/aleidk/keymaps.lua | 97 +++------ .../nvim/.config/nvim/lua/aleidk/options.lua | 185 ++++++++++-------- .../nvim}/lua/aleidk/plugins/bookmarks.lua | 0 .../nvim}/lua/aleidk/plugins/colorscheme.lua | 0 .../nvim}/lua/aleidk/plugins/comments.lua | 0 .../nvim}/lua/aleidk/plugins/completion.lua | 2 - .../lua/aleidk/plugins/file-explorer.lua | 0 .../nvim}/lua/aleidk/plugins/formatter.lua | 0 .../.config/nvim}/lua/aleidk/plugins/fzf.lua | 0 .../.config/nvim}/lua/aleidk/plugins/init.lua | 0 .../nvim}/lua/aleidk/plugins/linters.lua | 0 .../nvim}/lua/aleidk/plugins/markdown.lua | 0 .../.config/nvim}/lua/aleidk/plugins/mini.lua | 0 .../nvim}/lua/aleidk/plugins/smart-splits.lua | 0 .../nvim}/lua/aleidk/plugins/treesitter.lua | 0 .../nvim}/lua/aleidk/plugins/trouble.lua | 0 .../.config/nvim}/snippets/global.json | 0 .../after/queries/blade/highlights.scm | 0 .../after/queries/blade/injections.scm | 0 Configs/nvim_old/.config/nvim_old/init.lua | 7 + .../nvim_old/.config/nvim_old/lazy-lock.json | 57 ++++++ .../.config/nvim_old/lua/aleidk/autocmds.lua | 10 + .../nvim_old}/lua/aleidk/constants.lua | 0 .../.config/nvim_old/lua/aleidk/keymaps.lua | 77 ++++++++ .../.config/nvim_old}/lua/aleidk/lazy.lua | 0 .../.config/nvim_old/lua/aleidk/options.lua | 144 ++++++++++++++ .../lua/aleidk/plugins-base/auto-pairs.lua | 0 .../lua/aleidk/plugins-base/bookmarks.lua | 0 .../lua/aleidk/plugins-base/comments.lua | 0 .../lua/aleidk/plugins-base/file-explorer.lua | 0 .../aleidk/plugins-base/indent-blankline.lua | 0 .../lua/aleidk/plugins-base/treesitter.lua | 0 .../nvim_old}/lua/aleidk/plugins-base/ui.lua | 0 .../lua/aleidk/plugins-base/undo-tree.lua | 0 .../lua/aleidk/plugins-core/colorscheme.lua | 0 .../lua/aleidk/plugins-core/init.lua | 0 .../lua/aleidk/plugins-core/key-help.lua | 0 .../lua/aleidk/plugins-core/lualine.lua | 0 .../lua/aleidk/plugins-core/markdown.lua | 0 .../lua/aleidk/plugins-core/smart-splits.lua | 0 .../lua/aleidk/plugins-core/surround.lua | 0 .../lua/aleidk/plugins-core/telescope.lua | 0 .../lua/aleidk/plugins-core/todo-comments.lua | 0 .../lua/aleidk/plugins-ide/color-picker.lua | 0 .../lua/aleidk/plugins-ide/completion.lua | 0 .../lua/aleidk/plugins-ide/database.lua | 0 .../lua/aleidk/plugins-ide/doc-gen.lua | 0 .../lua/aleidk/plugins-ide/formatter.lua | 0 .../nvim_old}/lua/aleidk/plugins-ide/git.lua | 0 .../nvim_old}/lua/aleidk/plugins-ide/init.lua | 0 .../lua/aleidk/plugins-ide/linters.lua | 0 .../nvim_old}/lua/aleidk/plugins-ide/lsp.lua | 0 .../lua/aleidk/plugins-ide/luasnip.lua | 0 .../lua/aleidk/plugins-ide/remote-sshfs.lua | 0 .../lua/aleidk/plugins-ide/task-runner.lua | 0 .../lua/aleidk/plugins-ide/trouble.lua | 0 .../aleidk/plugins-ide/typescript-tools.lua | 0 .../.config/nvim_old}/lua/aleidk/utils.lua | 0 .../.config/nvim_unstable/init.lua | 33 ---- .../.config/nvim_unstable/lazy-lock.json | 35 ---- .../nvim_unstable/lua/aleidk/autocmds.lua | 34 ---- .../nvim_unstable/lua/aleidk/keymaps.lua | 34 ---- .../nvim_unstable/lua/aleidk/options.lua | 161 --------------- 66 files changed, 489 insertions(+), 498 deletions(-) rename Configs/{nvim_unstable/.config/nvim_unstable => nvim/.config/nvim}/lua/aleidk/plugins/bookmarks.lua (100%) rename Configs/{nvim_unstable/.config/nvim_unstable => nvim/.config/nvim}/lua/aleidk/plugins/colorscheme.lua (100%) rename Configs/{nvim_unstable/.config/nvim_unstable => nvim/.config/nvim}/lua/aleidk/plugins/comments.lua (100%) rename Configs/{nvim_unstable/.config/nvim_unstable => nvim/.config/nvim}/lua/aleidk/plugins/completion.lua (94%) rename Configs/{nvim_unstable/.config/nvim_unstable => nvim/.config/nvim}/lua/aleidk/plugins/file-explorer.lua (100%) rename Configs/{nvim_unstable/.config/nvim_unstable => nvim/.config/nvim}/lua/aleidk/plugins/formatter.lua (100%) rename Configs/{nvim_unstable/.config/nvim_unstable => nvim/.config/nvim}/lua/aleidk/plugins/fzf.lua (100%) rename Configs/{nvim_unstable/.config/nvim_unstable => nvim/.config/nvim}/lua/aleidk/plugins/init.lua (100%) rename Configs/{nvim_unstable/.config/nvim_unstable => nvim/.config/nvim}/lua/aleidk/plugins/linters.lua (100%) rename Configs/{nvim_unstable/.config/nvim_unstable => nvim/.config/nvim}/lua/aleidk/plugins/markdown.lua (100%) rename Configs/{nvim_unstable/.config/nvim_unstable => nvim/.config/nvim}/lua/aleidk/plugins/mini.lua (100%) rename Configs/{nvim_unstable/.config/nvim_unstable => nvim/.config/nvim}/lua/aleidk/plugins/smart-splits.lua (100%) rename Configs/{nvim_unstable/.config/nvim_unstable => nvim/.config/nvim}/lua/aleidk/plugins/treesitter.lua (100%) rename Configs/{nvim_unstable/.config/nvim_unstable => nvim/.config/nvim}/lua/aleidk/plugins/trouble.lua (100%) rename Configs/{nvim_unstable/.config/nvim_unstable => nvim/.config/nvim}/snippets/global.json (100%) rename Configs/{nvim/.config/nvim => nvim_old/.config/nvim_old}/after/queries/blade/highlights.scm (100%) rename Configs/{nvim/.config/nvim => nvim_old/.config/nvim_old}/after/queries/blade/injections.scm (100%) create mode 100644 Configs/nvim_old/.config/nvim_old/init.lua create mode 100644 Configs/nvim_old/.config/nvim_old/lazy-lock.json create mode 100644 Configs/nvim_old/.config/nvim_old/lua/aleidk/autocmds.lua rename Configs/{nvim_unstable/.config/nvim_unstable => nvim_old/.config/nvim_old}/lua/aleidk/constants.lua (100%) create mode 100644 Configs/nvim_old/.config/nvim_old/lua/aleidk/keymaps.lua rename Configs/{nvim/.config/nvim => nvim_old/.config/nvim_old}/lua/aleidk/lazy.lua (100%) create mode 100644 Configs/nvim_old/.config/nvim_old/lua/aleidk/options.lua rename Configs/{nvim/.config/nvim => nvim_old/.config/nvim_old}/lua/aleidk/plugins-base/auto-pairs.lua (100%) rename Configs/{nvim/.config/nvim => nvim_old/.config/nvim_old}/lua/aleidk/plugins-base/bookmarks.lua (100%) rename Configs/{nvim/.config/nvim => nvim_old/.config/nvim_old}/lua/aleidk/plugins-base/comments.lua (100%) rename Configs/{nvim/.config/nvim => nvim_old/.config/nvim_old}/lua/aleidk/plugins-base/file-explorer.lua (100%) rename Configs/{nvim/.config/nvim => nvim_old/.config/nvim_old}/lua/aleidk/plugins-base/indent-blankline.lua (100%) rename Configs/{nvim/.config/nvim => nvim_old/.config/nvim_old}/lua/aleidk/plugins-base/treesitter.lua (100%) rename Configs/{nvim/.config/nvim => nvim_old/.config/nvim_old}/lua/aleidk/plugins-base/ui.lua (100%) rename Configs/{nvim/.config/nvim => nvim_old/.config/nvim_old}/lua/aleidk/plugins-base/undo-tree.lua (100%) rename Configs/{nvim/.config/nvim => nvim_old/.config/nvim_old}/lua/aleidk/plugins-core/colorscheme.lua (100%) rename Configs/{nvim/.config/nvim => nvim_old/.config/nvim_old}/lua/aleidk/plugins-core/init.lua (100%) rename Configs/{nvim/.config/nvim => nvim_old/.config/nvim_old}/lua/aleidk/plugins-core/key-help.lua (100%) rename Configs/{nvim/.config/nvim => nvim_old/.config/nvim_old}/lua/aleidk/plugins-core/lualine.lua (100%) rename Configs/{nvim/.config/nvim => nvim_old/.config/nvim_old}/lua/aleidk/plugins-core/markdown.lua (100%) rename Configs/{nvim/.config/nvim => nvim_old/.config/nvim_old}/lua/aleidk/plugins-core/smart-splits.lua (100%) rename Configs/{nvim/.config/nvim => nvim_old/.config/nvim_old}/lua/aleidk/plugins-core/surround.lua (100%) rename Configs/{nvim/.config/nvim => nvim_old/.config/nvim_old}/lua/aleidk/plugins-core/telescope.lua (100%) rename Configs/{nvim/.config/nvim => nvim_old/.config/nvim_old}/lua/aleidk/plugins-core/todo-comments.lua (100%) rename Configs/{nvim/.config/nvim => nvim_old/.config/nvim_old}/lua/aleidk/plugins-ide/color-picker.lua (100%) rename Configs/{nvim/.config/nvim => nvim_old/.config/nvim_old}/lua/aleidk/plugins-ide/completion.lua (100%) rename Configs/{nvim/.config/nvim => nvim_old/.config/nvim_old}/lua/aleidk/plugins-ide/database.lua (100%) rename Configs/{nvim/.config/nvim => nvim_old/.config/nvim_old}/lua/aleidk/plugins-ide/doc-gen.lua (100%) rename Configs/{nvim/.config/nvim => nvim_old/.config/nvim_old}/lua/aleidk/plugins-ide/formatter.lua (100%) rename Configs/{nvim/.config/nvim => nvim_old/.config/nvim_old}/lua/aleidk/plugins-ide/git.lua (100%) rename Configs/{nvim/.config/nvim => nvim_old/.config/nvim_old}/lua/aleidk/plugins-ide/init.lua (100%) rename Configs/{nvim/.config/nvim => nvim_old/.config/nvim_old}/lua/aleidk/plugins-ide/linters.lua (100%) rename Configs/{nvim/.config/nvim => nvim_old/.config/nvim_old}/lua/aleidk/plugins-ide/lsp.lua (100%) rename Configs/{nvim/.config/nvim => nvim_old/.config/nvim_old}/lua/aleidk/plugins-ide/luasnip.lua (100%) rename Configs/{nvim/.config/nvim => nvim_old/.config/nvim_old}/lua/aleidk/plugins-ide/remote-sshfs.lua (100%) rename Configs/{nvim/.config/nvim => nvim_old/.config/nvim_old}/lua/aleidk/plugins-ide/task-runner.lua (100%) rename Configs/{nvim/.config/nvim => nvim_old/.config/nvim_old}/lua/aleidk/plugins-ide/trouble.lua (100%) rename Configs/{nvim/.config/nvim => nvim_old/.config/nvim_old}/lua/aleidk/plugins-ide/typescript-tools.lua (100%) rename Configs/{nvim/.config/nvim => nvim_old/.config/nvim_old}/lua/aleidk/utils.lua (100%) delete mode 100644 Configs/nvim_unstable/.config/nvim_unstable/init.lua delete mode 100644 Configs/nvim_unstable/.config/nvim_unstable/lazy-lock.json delete mode 100644 Configs/nvim_unstable/.config/nvim_unstable/lua/aleidk/autocmds.lua delete mode 100644 Configs/nvim_unstable/.config/nvim_unstable/lua/aleidk/keymaps.lua delete mode 100644 Configs/nvim_unstable/.config/nvim_unstable/lua/aleidk/options.lua diff --git a/Configs/nvim/.config/nvim/init.lua b/Configs/nvim/.config/nvim/init.lua index 2925f22..149787a 100644 --- a/Configs/nvim/.config/nvim/init.lua +++ b/Configs/nvim/.config/nvim/init.lua @@ -1,7 +1,33 @@ --- Loadnoptions before anything +-- Bootstrap lazy.nvim +local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" +if not (vim.uv or vim.loop).fs_stat(lazypath) then + local lazyrepo = "https://github.com/folke/lazy.nvim.git" + local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) + if vim.v.shell_error ~= 0 then + vim.api.nvim_echo({ + { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, + { out, "WarningMsg" }, + { "\nPress any key to exit..." }, + }, true, {}) + vim.fn.getchar() + os.exit(1) + end +end +vim.opt.rtp:prepend(lazypath) + require("aleidk.options") - -require("aleidk.lazy") - -require("aleidk.keymaps") require("aleidk.autocmds") +require("aleidk.keymaps") + +-- Setup lazy.nvim +require("lazy").setup({ + spec = { + -- import your plugins + { import = "aleidk/plugins" }, + }, + -- Configure any other settings here. See the documentation for more details. + -- colorscheme that will be used when installing plugins. + install = { colorscheme = { "habamax" } }, + -- automatically check for plugin updates +-- checker = { enabled = true }, +}) diff --git a/Configs/nvim/.config/nvim/lazy-lock.json b/Configs/nvim/.config/nvim/lazy-lock.json index 507d965..00758be 100644 --- a/Configs/nvim/.config/nvim/lazy-lock.json +++ b/Configs/nvim/.config/nvim/lazy-lock.json @@ -1,57 +1,28 @@ { - "LuaSnip": { "branch": "master", "commit": "0f7bbce41ea152a94d12aea286f2ce98e63c0f58" }, "blink.cmp": { "branch": "main", "commit": "81069e3955a8b4d5063287a2a6a47a844e9ca2cb" }, "blink.compat": { "branch": "main", "commit": "08943fdf2eb00432d6205db6d0239434135416bd" }, "catppuccin": { "branch": "main", "commit": "faf15ab0201b564b6368ffa47b56feefc92ce3f4" }, - "ccc.nvim": { "branch": "main", "commit": "7c639042583c7bdc7ce2e37e5a0e0aa6d0659c6a" }, "comment-box.nvim": { "branch": "main", "commit": "06bb771690bc9df0763d14769b779062d8f12bc5" }, "conform.nvim": { "branch": "master", "commit": "a203480a350b03092e473bf3001733d547160a73" }, - "copilot-lualine": { "branch": "main", "commit": "f40450c3e138766026327e7807877ea860618258" }, - "dressing.nvim": { "branch": "master", "commit": "fc78a3ca96f4db9f8893bb7e2fd9823e0780451b" }, "friendly-snippets": { "branch": "main", "commit": "de8fce94985873666bd9712ea3e49ee17aadb1ed" }, - "gitsigns.nvim": { "branch": "main", "commit": "5f808b5e4fef30bd8aca1b803b4e555da07fc412" }, + "fzf-lua": { "branch": "main", "commit": "8adf950093af5361621cf52208d64995b1af78b5" }, "grapple.nvim": { "branch": "main", "commit": "b41ddfc1c39f87f3d1799b99c2f0f1daa524c5f7" }, - "indent-blankline.nvim": { "branch": "master", "commit": "7871a88056f7144defca9c931e311a3134c5d509" }, "lazy.nvim": { "branch": "main", "commit": "56ead98e05bb37a4ec28930a54d836d033cf00f2" }, "lazydev.nvim": { "branch": "main", "commit": "f59bd14a852ca43db38e3662395354cb2a9b13e0" }, - "lualine.nvim": { "branch": "master", "commit": "2a5bae925481f999263d6f5ed8361baef8df4f83" }, - "luvit-meta": { "branch": "main", "commit": "57d464c4acb5c2e66bd4145060f5dc9e96a7bbb7" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "43894adcf10bb1190c2184bd7c1750e8ea2b3dce" }, "mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" }, - "mini.clue": { "branch": "main", "commit": "8e329f586a7cfd06085859066a4b60965fc4ecce" }, - "mini.comment": { "branch": "main", "commit": "03c13e37318bdb18481311c0ac1adc9ed731caf1" }, - "mini.surround": { "branch": "main", "commit": "0e67c4bc147f2a15cee94e7c94dcc0e115b9f55e" }, + "mini.nvim": { "branch": "main", "commit": "94cae4660a8b2d95dbbd56e1fbc6fcfa2716d152" }, "neogen": { "branch": "main", "commit": "dc50715c009f89b8111197fd2f282f6042daa7ea" }, - "noice.nvim": { "branch": "main", "commit": "c6f6fb178ebe9b4fd90383de743c3399f8c3a37c" }, - "nui.nvim": { "branch": "main", "commit": "b58e2bfda5cea347c9d58b7f11cf3012c7b3953f" }, - "nvim-autopairs": { "branch": "master", "commit": "b464658e9b880f463b9f7e6ccddd93fb0013f559" }, "nvim-lint": { "branch": "master", "commit": "6b46370d02cd001509a765591a3ffc481b538794" }, "nvim-lspconfig": { "branch": "master", "commit": "4ae9796c4e95ca84ec77946a9f9089b8f1a3eec9" }, - "nvim-notify": { "branch": "master", "commit": "fbef5d32be8466dd76544a257d3f3dce20082a07" }, "nvim-treesitter": { "branch": "master", "commit": "8d4fdc5e47e2a4e00179e43f56221250ce365973" }, "nvim-treesitter-context": { "branch": "master", "commit": "6b081ea63a3711243d11540ce28ccdb6f35ecd33" }, - "nvim-treesitter-textobjects": { "branch": "master", "commit": "ad8f0a472148c3e0ae9851e26a722ee4e29b1595" }, - "nvim-ts-autotag": { "branch": "main", "commit": "e239a560f338be31337e7abc3ee42515daf23f5e" }, "nvim-ts-context-commentstring": { "branch": "main", "commit": "9c74db656c3d0b1c4392fc89a016b1910539e7c0" }, "nvim-web-devicons": { "branch": "master", "commit": "edbe0a65cfacbbfff6a4a1e98ddd60c28c560509" }, - "overseer.nvim": { "branch": "master", "commit": "10ee48ff96c8d1049efb278ea4c8cf9f3b0e4326" }, "plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" }, - "remote-nvim.nvim": { "branch": "main", "commit": "66fc20fd259401c7bb6ac5189ecb6283c2eb65d2" }, - "remote-sshfs.nvim": { "branch": "main", "commit": "03f6c40c4032eeb1ab91368e06db9c3f3a97a75d" }, "render-markdown": { "branch": "main", "commit": "6096cf3608b576a38fd1396227dbc0473091714d" }, "smart-splits.nvim": { "branch": "master", "commit": "fc7bb00fe67ab504356bed4310d23c2e4cb4b06b" }, - "telescope-fzf-native.nvim": { "branch": "main", "commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b" }, - "telescope.nvim": { "branch": "0.1.x", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" }, - "todo-comments.nvim": { "branch": "main", "commit": "ae0a2afb47cf7395dc400e5dc4e05274bf4fb9e0" }, - "treesj": { "branch": "main", "commit": "03415ac60791d48e120a80d37e080744faf3ac15" }, "trouble.nvim": { "branch": "main", "commit": "46cf952fc115f4c2b98d4e208ed1e2dce08c9bf6" }, "ts-node-action": { "branch": "master", "commit": "6d3b60754fd87963d70eadaa2f77873b447eac26" }, - "typescript-tools.nvim": { "branch": "master", "commit": "346062e8cd06e82776b60785a040dfbbdcb6de77" }, - "undotree": { "branch": "master", "commit": "78b5241191852ffa9bb5da5ff2ee033160798c3b" }, - "vim-dadbod": { "branch": "master", "commit": "fe5a55e92b2dded7c404006147ef97fb073d8b1b" }, - "vim-dadbod-completion": { "branch": "master", "commit": "da0e75c09c27a82aad078d993bb1b2f4afd43427" }, - "vim-dadbod-ui": { "branch": "master", "commit": "28a16902cb2134c934b85da5250033ee43b0dee5" }, - "vim-illuminate": { "branch": "master", "commit": "5eeb7951fc630682c322e88a9bbdae5c224ff0aa" }, "vim-sleuth": { "branch": "master", "commit": "be69bff86754b1aa5adcbb527d7fcd1635a84080" }, "yazi.nvim": { "branch": "main", "commit": "053867916a9be3cb46f84b6f095ee731bbddd213" } } diff --git a/Configs/nvim/.config/nvim/lua/aleidk/autocmds.lua b/Configs/nvim/.config/nvim/lua/aleidk/autocmds.lua index 22c9fbd..9e7e188 100644 --- a/Configs/nvim/.config/nvim/lua/aleidk/autocmds.lua +++ b/Configs/nvim/.config/nvim/lua/aleidk/autocmds.lua @@ -1,10 +1,34 @@ --- Highlight on yank --- See `:help vim.highlight.on_yank()` -local highlight_group = vim.api.nvim_create_augroup("YankHighlight", { clear = true }) -vim.api.nvim_create_autocmd("TextYankPost", { - callback = function() - vim.highlight.on_yank() - end, - group = highlight_group, - pattern = "*", +vim.api.nvim_create_autocmd('LspAttach', { + callback = function(args) + local client = vim.lsp.get_client_by_id(args.data.client_id) + + if not client then + return + end + + vim.bo[args.buf].omnifunc = 'v:lua.MiniCompletion.completefunc_lsp' + + -- Prefer LSP folding if client supports it + if client:supports_method('textDocument/foldingRange') then + local win = vim.api.nvim_get_current_win() + vim.wo[win][0].foldexpr = 'v:lua.vim.lsp.foldexpr()' + end + + vim.keymap.set({ "n", "x", "v" }, "la", vim.lsp.buf.code_action, { buffer = args.buf, desc = "Code Action" }) + vim.keymap.set({ "n", "x", "v" }, "ld", vim.diagnostic.open_float, { desc = "Show diagnostic under cursor" }) + vim.keymap.set({ "n", "x", "v" }, "lc", function() + local curpos = vim.fn.getcurpos() + local diagnostics = vim.diagnostic.get(0, { lnum = curpos[2] - 1 }) + + if #diagnostics == 0 then + vim.notify("No diagnostic under cursor") + return + end + + local diagnostic = diagnostics[1] + local msg = string.format("%s [%s]: %s", diagnostic.source, diagnostic.code, diagnostic.message) + vim.fn.setreg("+", msg) + vim.notify("Diagnostic saved to clipboard:\n\n" .. msg) + end, { buffer = args.buf, desc = "Copy diagnostic to clipboard" }) + end, }) diff --git a/Configs/nvim/.config/nvim/lua/aleidk/keymaps.lua b/Configs/nvim/.config/nvim/lua/aleidk/keymaps.lua index fde7c73..f7a3019 100644 --- a/Configs/nvim/.config/nvim/lua/aleidk/keymaps.lua +++ b/Configs/nvim/.config/nvim/lua/aleidk/keymaps.lua @@ -1,77 +1,34 @@ --- [[ Basic Keymaps ]] - -function MAP(mode, l, r, desc) - vim.keymap.set(mode, l, r, { desc = desc, silent = true }) -end - -function ReloadModule(module) - package.loaded[module] = nil - require(module) -end - -local function default(desc) - return { - silent = true, - desc = desc, - } -end - -local function fixIndentation() - local indent = 2 - vim.opt.tabstop = indent - vim.opt.shiftwidth = indent - vim.opt.softtabstop = indent - - vim.cmd("retab") -end - --- Keymaps for better default experience --- See `:help vim.keymap.set()` -vim.keymap.set({ "n", "v" }, "", "", { silent = true }) - --- vim.keymap.set("n", "", "w", default("Keep cursor centered while junping")) - --- Remap for dealing with word wrap -vim.keymap.set("n", "k", "v:count == 0 ? 'gk' : 'k'", { expr = true, silent = true }) -vim.keymap.set("n", "j", "v:count == 0 ? 'gj' : 'j'", { expr = true, silent = true }) - -vim.keymap.set("n", "J", "mzJ`z", default("Keep cursor in column while joining lines")) - -vim.keymap.set("n", "|", ":vs", default("Open vsplit")) -vim.keymap.set("n", "°", ":sp", default("Open split")) - -vim.keymap.set("n", "", "zz", default("Keep cursor centered while junping")) -vim.keymap.set("n", "", "zz", default("Keep cursor centered while junping")) - -vim.keymap.set("n", "n", "nzzzv", default("Keep cursor centered while searching")) -vim.keymap.set("n", "N", "Nzzzv", default("Keep cursor centered while searching")) - +-- stylua: ignore start +-- QoL normalization's vim.keymap.set("n", "Q", "", {}) +vim.keymap.set({ "n", "v" }, "", "", { desc = "Prevent cursor movement", silent = true }) +vim.keymap.set("n", "k", "v:count == 0 ? 'gk' : 'k'", + { desc = "Move cursor regardless of word wrap", expr = true, silent = true }) +vim.keymap.set("n", "j", "v:count == 0 ? 'gj' : 'j'", + { desc = "Move cursor regardless of word wrap", expr = true, silent = true }) +vim.keymap.set("n", "J", "mzJ`z", { desc = "Keep cursor in column while joining lines", silent = true }) -vim.keymap.set( - "n", - "rw", - [[:%s/\<\>//gI]], - default("Search and replace current word") -) +-- vim.keymap.set("n", "", "zz", { desc = "Keep cursor centered while junping", silent = true }) +-- vim.keymap.set("n", "", "zz", { desc = "Keep cursor centered while junping", silent = true }) +-- vim.keymap.set("n", "n", "nzzzv", { desc = "Keep cursor centered while searching", silent = true }) +-- vim.keymap.set("n", "N", "Nzzzv", { desc = "Keep cursor centered while searching", silent = true }) --- vim.keymap.set("n", "rR", ":s/", default("Search and replace inline")) --- vim.keymap.set("n", "rr", ":%s/", default("Search and replace globally")) --- vim.keymap.set("v", "r", ":s/", default("Search and replace in selection")) +-- Utils +vim.keymap.set("n", "|", ":vs", { desc = "Create vsplit", silent = true }) +vim.keymap.set("n", "°", ":sp", { desc = "Create split", silent = true }) -vim.keymap.set("v", "p", [["_dP]], default("Paste without lossing yanked text")) +vim.keymap.set("v", "p", [["_dP]], { desc = "Paste without lossing yanked text", silent = true }) +vim.keymap.set("n", "uh", ":nohl", { desc = "Remove search highlight", silent = true }) -vim.keymap.set("v", "J", ":m '>+1gv=gv", default("Move selection down")) -vim.keymap.set("v", "K", ":m '<-2gv=gv", default("Move selection up")) -vim.keymap.set("n", "uI", fixIndentation, default("Fix indentation")) -vim.keymap.set("n", "uO", function() ReloadModule('aleidk.options') end, - default("Reload the options configuration")) +-- Buffer manipulation +vim.keymap.set("n", "bc", "bd", { desc = "Close buffer", silent = true }) +vim.keymap.set("n", "bh", "bp", { desc = "Prev buffer", silent = true }) +vim.keymap.set("n", "bl", "bn", { desc = "Next buffer", silent = true }) +vim.keymap.set("n", "bA", "bufdo bd", { desc = "Close all buffers", silent = true }) -vim.keymap.set("n", "uh", ":nohl", default("Remove search highlight")) +vim.keymap.set("n", "", "h", { desc = "Move to left window", silent = true }) +vim.keymap.set("n", "", "j", { desc = "Move to bottom window", silent = true }) +vim.keymap.set("n", "", "k", { desc = "Move to top window", silent = true }) +vim.keymap.set("n", "", "l", { desc = "Move to right window", silent = true }) -vim.keymap.set("t", "", "", default("Exit insert mode on terminal")) - -vim.keymap.set("n", "bc", "bd", default("Close buffer")) -vim.keymap.set("n", "bh", "bp", default("Prev buffer")) -vim.keymap.set("n", "bl", "bn", default("Next buffer")) -vim.keymap.set("n", "bA", "bufdo bd", default("Close all buffers")) +-- stylua: ignore end diff --git a/Configs/nvim/.config/nvim/lua/aleidk/options.lua b/Configs/nvim/.config/nvim/lua/aleidk/options.lua index 6378dc5..f7b0ff6 100644 --- a/Configs/nvim/.config/nvim/lua/aleidk/options.lua +++ b/Configs/nvim/.config/nvim/lua/aleidk/options.lua @@ -9,10 +9,15 @@ vim.o.diffopt = "vertical,closeoff,filler" local opt = vim.opt --- stylua: ignore -opt.autowrite = true -- Enable auto write -opt.clipboard = "unnamedplus" -- Sync with system clipboard -opt.completeopt = "menu,menuone,noselect" +vim.schedule(function() + vim.opt.clipboard = 'unnamedplus' +end) + +vim.o.winborder = 'rounded' +opt.breakindent = true -- Every wrapped line will continue visually indented +opt.autowrite = true -- Enable auto write +-- opt.completeopt = "menu,menuone,noselect" +vim.o.completeopt = 'noselect,menu,menuone,noinsert,popup' opt.conceallevel = 2 -- Hide * markup for bold and italic opt.confirm = true -- Confirm to save changes before exiting modified buffer opt.cursorline = true -- Enable highlighting of the current line @@ -23,7 +28,8 @@ opt.grepprg = "rg --vimgrep" opt.ignorecase = true -- Ignore case opt.inccommand = "nosplit" -- preview incremental substitute opt.laststatus = 0 -opt.list = true -- Show some invisible characters (tabs... +vim.opt.list = true -- Sets how neovim will display certain whitespace characters in the editor. +vim.opt.listchars = { tab = '» ', trail = '·', nbsp = '␣' } opt.mouse = "a" -- Enable mouse mode opt.number = true -- Print line number opt.pumblend = 10 -- Popup blend @@ -34,7 +40,7 @@ opt.sessionoptions = { "buffers", "curdir", "tabpages", "winsize" } opt.shiftround = true -- Round indent opt.shiftwidth = 2 -- Size of an indent -- opt.shortmess:append({ W = true, I = true, c = true }) -- INFO: this control the format of some messages -opt.showmode = false -- Dont show mode since we have a statusline +opt.showmode = false -- Don't show mode since we have a statusline opt.sidescrolloff = 8 -- Columns of context opt.signcolumn = "yes" -- Always show the signcolumn, otherwise it would shift the text each time opt.smartcase = true -- Don't ignore case with capitals @@ -44,101 +50,112 @@ opt.splitbelow = true -- Put new windows below current opt.splitright = true -- Put new windows right of current opt.tabstop = 2 -- Number of spaces tabs count for opt.termguicolors = true -- True color support -opt.timeoutlen = 300 opt.undofile = true opt.undolevels = 10000 opt.updatetime = 200 -- Save swap file and trigger CursorHold opt.wildmode = "longest,list:full" -- Command-line completion mode opt.winminwidth = 5 -- Minimum window width opt.wrap = false -- Disable line wrap +vim.opt.inccommand = 'split' -- Preview substitutions live, as you type! vim.o.sessionoptions = "blank,buffers,curdir,folds,help,tabpages,winsize,winpos,terminal,localoptions" +-- Nice and simple folding: +vim.o.foldenable = true +vim.o.foldlevel = 99 +vim.o.foldmethod = "expr" +vim.o.foldexpr = "v:lua.vim.treesitter.foldexpr()" +vim.opt.fillchars:append({ fold = " " }) + local fn = vim.fn -- Quickfix customization function _G.qftf(info) - local items - local ret = {} - -- The name of item in list is based on the directory of quickfix window. - -- Change the directory for quickfix window make the name of item shorter. - -- It's a good opportunity to change current directory in quickfixtextfunc :) - -- - -- local alterBufnr = fn.bufname('#') -- alternative buffer is the buffer before enter qf window - -- local root = getRootByAlterBufnr(alterBufnr) - -- vim.cmd(('noa lcd %s'):format(fn.fnameescape(root))) - -- - if info.quickfix == 1 then - items = fn.getqflist({ id = info.id, items = 0 }).items - else - items = fn.getloclist(info.winid, { id = info.id, items = 0 }).items - end - local limit = 31 - local fnameFmt1, fnameFmt2 = "%-" .. limit .. "s", "…%." .. (limit - 1) .. "s" - local validFmt = "%s │%5d:%-3d│%s %s" - for i = info.start_idx, info.end_idx do - local e = items[i] - local fname = "" - local str - if e.valid == 1 then - if e.bufnr > 0 then - fname = fn.bufname(e.bufnr) - if fname == "" then - fname = "[No Name]" - else - fname = fname:gsub("^" .. vim.env.HOME, "~") - end - -- char in fname may occur more than 1 width, ignore this issue in order to keep performance - if #fname <= limit then - fname = fnameFmt1:format(fname) - else - fname = fnameFmt2:format(fname:sub(1 - limit)) - end - end - local lnum = e.lnum > 99999 and -1 or e.lnum - local col = e.col > 999 and -1 or e.col - local qtype = e.type == "" and "" or " " .. e.type:sub(1, 1):upper() - str = validFmt:format(fname, lnum, col, qtype, e.text) - else - str = e.text - end - table.insert(ret, str) - end - return ret + local items + local ret = {} + -- The name of item in list is based on the directory of quickfix window. + -- Change the directory for quickfix window make the name of item shorter. + -- It's a good opportunity to change current directory in quickfixtextfunc :) + -- + -- local alterBufnr = fn.bufname('#') -- alternative buffer is the buffer before enter qf window + -- local root = getRootByAlterBufnr(alterBufnr) + -- vim.cmd(('noa lcd %s'):format(fn.fnameescape(root))) + -- + if info.quickfix == 1 then + items = fn.getqflist({ id = info.id, items = 0 }).items + else + items = fn.getloclist(info.winid, { id = info.id, items = 0 }).items + end + local limit = 31 + local fnameFmt1, fnameFmt2 = "%-" .. limit .. "s", "…%." .. (limit - 1) .. "s" + local validFmt = "%s │%5d:%-3d│%s %s" + for i = info.start_idx, info.end_idx do + local e = items[i] + local fname = "" + local str + if e.valid == 1 then + if e.bufnr > 0 then + fname = fn.bufname(e.bufnr) + if fname == "" then + fname = "[No Name]" + else + fname = fname:gsub("^" .. vim.env.HOME, "~") + end + -- char in fname may occur more than 1 width, ignore this issue in order to keep performance + if #fname <= limit then + fname = fnameFmt1:format(fname) + else + fname = fnameFmt2:format(fname:sub(1 - limit)) + end + end + local lnum = e.lnum > 99999 and -1 or e.lnum + local col = e.col > 999 and -1 or e.col + local qtype = e.type == "" and "" or " " .. e.type:sub(1, 1):upper() + str = validFmt:format(fname, lnum, col, qtype, e.text) + else + str = e.text + end + table.insert(ret, str) + end + return ret end -- TODO: how to customize? vim.o.qftf = "{info -> v:lua._G.qftf(info)}" vim.filetype.add({ - -- Detect and assign filetype based on the extension of the filename - extension = { - mdx = "mdx", - log = "log", - conf = "conf", - env = "dotenv" - }, - -- Detect and apply filetypes based on the entire filename - filename = { - [".env"] = "dotenv", - ["env"] = "dotenv", - ["tsconfig.json"] = "jsonc", - }, - -- Detect and apply filetypes based on certain patterns of the filenames - pattern = { - -- INFO: Match filenames like - ".env.example", ".env.local" and so on - ["%.env%.[%w_.-]+"] = "dotenv", - [".*%.blade%.php"] = "blade", - [".*%.hurl.*"] = "hurl", - [".*/hypr/.*%.conf"] = "hyprlang", - ['.*/systemd/.*%.(%a+)'] = function(path, bufnr, ext) - vim.print(ext) - local allowed = { "container", "volume", "network", "build", "pod", "kube" } - for _, v in ipairs(allowed) do - if v == ext then - return "ini" - end - end - end, - }, + -- Detect and assign filetype based on the extension of the filename + extension = { + mdx = "mdx", + log = "log", + conf = "conf", + env = "dotenv", + }, + -- Detect and apply filetypes based on the entire filename + filename = { + [".env"] = "dotenv", + ["env"] = "dotenv", + ["tsconfig.json"] = "jsonc", + }, + -- Detect and apply filetypes based on certain patterns of the filenames + pattern = { + -- INFO: Match filenames like - ".env.example", ".env.local" and so on + ["%.env%.[%w_.-]+"] = "dotenv", + [".*%.blade%.php"] = "blade", + [".*%.hurl.*"] = "hurl", + [".*/hypr/.*%.conf"] = "hyprlang", + }, +}) + +-- ╭─────────────────────────────────────────────────────────╮ +-- │ LSP │ +-- ╰─────────────────────────────────────────────────────────╯ + +vim.lsp.enable({ + "rust_analyzer", + "lua_ls", +}) + +vim.diagnostic.config({ + virtual_lines = { current_line = true }, }) diff --git a/Configs/nvim_unstable/.config/nvim_unstable/lua/aleidk/plugins/bookmarks.lua b/Configs/nvim/.config/nvim/lua/aleidk/plugins/bookmarks.lua similarity index 100% rename from Configs/nvim_unstable/.config/nvim_unstable/lua/aleidk/plugins/bookmarks.lua rename to Configs/nvim/.config/nvim/lua/aleidk/plugins/bookmarks.lua diff --git a/Configs/nvim_unstable/.config/nvim_unstable/lua/aleidk/plugins/colorscheme.lua b/Configs/nvim/.config/nvim/lua/aleidk/plugins/colorscheme.lua similarity index 100% rename from Configs/nvim_unstable/.config/nvim_unstable/lua/aleidk/plugins/colorscheme.lua rename to Configs/nvim/.config/nvim/lua/aleidk/plugins/colorscheme.lua diff --git a/Configs/nvim_unstable/.config/nvim_unstable/lua/aleidk/plugins/comments.lua b/Configs/nvim/.config/nvim/lua/aleidk/plugins/comments.lua similarity index 100% rename from Configs/nvim_unstable/.config/nvim_unstable/lua/aleidk/plugins/comments.lua rename to Configs/nvim/.config/nvim/lua/aleidk/plugins/comments.lua diff --git a/Configs/nvim_unstable/.config/nvim_unstable/lua/aleidk/plugins/completion.lua b/Configs/nvim/.config/nvim/lua/aleidk/plugins/completion.lua similarity index 94% rename from Configs/nvim_unstable/.config/nvim_unstable/lua/aleidk/plugins/completion.lua rename to Configs/nvim/.config/nvim/lua/aleidk/plugins/completion.lua index 1101f70..c1c43fd 100644 --- a/Configs/nvim_unstable/.config/nvim_unstable/lua/aleidk/plugins/completion.lua +++ b/Configs/nvim/.config/nvim/lua/aleidk/plugins/completion.lua @@ -37,7 +37,6 @@ return { }, sources = { providers = { - dadbod = { name = "Dadbod", module = "vim_dadbod_completion.blink" }, lazydev = { name = "LazyDev", module = "lazydev.integrations.blink" }, luasnip = { name = 'luasnip', @@ -54,7 +53,6 @@ return { "path", "snippets", "buffer", - "dadbod", "lazydev", }, }, diff --git a/Configs/nvim_unstable/.config/nvim_unstable/lua/aleidk/plugins/file-explorer.lua b/Configs/nvim/.config/nvim/lua/aleidk/plugins/file-explorer.lua similarity index 100% rename from Configs/nvim_unstable/.config/nvim_unstable/lua/aleidk/plugins/file-explorer.lua rename to Configs/nvim/.config/nvim/lua/aleidk/plugins/file-explorer.lua diff --git a/Configs/nvim_unstable/.config/nvim_unstable/lua/aleidk/plugins/formatter.lua b/Configs/nvim/.config/nvim/lua/aleidk/plugins/formatter.lua similarity index 100% rename from Configs/nvim_unstable/.config/nvim_unstable/lua/aleidk/plugins/formatter.lua rename to Configs/nvim/.config/nvim/lua/aleidk/plugins/formatter.lua diff --git a/Configs/nvim_unstable/.config/nvim_unstable/lua/aleidk/plugins/fzf.lua b/Configs/nvim/.config/nvim/lua/aleidk/plugins/fzf.lua similarity index 100% rename from Configs/nvim_unstable/.config/nvim_unstable/lua/aleidk/plugins/fzf.lua rename to Configs/nvim/.config/nvim/lua/aleidk/plugins/fzf.lua diff --git a/Configs/nvim_unstable/.config/nvim_unstable/lua/aleidk/plugins/init.lua b/Configs/nvim/.config/nvim/lua/aleidk/plugins/init.lua similarity index 100% rename from Configs/nvim_unstable/.config/nvim_unstable/lua/aleidk/plugins/init.lua rename to Configs/nvim/.config/nvim/lua/aleidk/plugins/init.lua diff --git a/Configs/nvim_unstable/.config/nvim_unstable/lua/aleidk/plugins/linters.lua b/Configs/nvim/.config/nvim/lua/aleidk/plugins/linters.lua similarity index 100% rename from Configs/nvim_unstable/.config/nvim_unstable/lua/aleidk/plugins/linters.lua rename to Configs/nvim/.config/nvim/lua/aleidk/plugins/linters.lua diff --git a/Configs/nvim_unstable/.config/nvim_unstable/lua/aleidk/plugins/markdown.lua b/Configs/nvim/.config/nvim/lua/aleidk/plugins/markdown.lua similarity index 100% rename from Configs/nvim_unstable/.config/nvim_unstable/lua/aleidk/plugins/markdown.lua rename to Configs/nvim/.config/nvim/lua/aleidk/plugins/markdown.lua diff --git a/Configs/nvim_unstable/.config/nvim_unstable/lua/aleidk/plugins/mini.lua b/Configs/nvim/.config/nvim/lua/aleidk/plugins/mini.lua similarity index 100% rename from Configs/nvim_unstable/.config/nvim_unstable/lua/aleidk/plugins/mini.lua rename to Configs/nvim/.config/nvim/lua/aleidk/plugins/mini.lua diff --git a/Configs/nvim_unstable/.config/nvim_unstable/lua/aleidk/plugins/smart-splits.lua b/Configs/nvim/.config/nvim/lua/aleidk/plugins/smart-splits.lua similarity index 100% rename from Configs/nvim_unstable/.config/nvim_unstable/lua/aleidk/plugins/smart-splits.lua rename to Configs/nvim/.config/nvim/lua/aleidk/plugins/smart-splits.lua diff --git a/Configs/nvim_unstable/.config/nvim_unstable/lua/aleidk/plugins/treesitter.lua b/Configs/nvim/.config/nvim/lua/aleidk/plugins/treesitter.lua similarity index 100% rename from Configs/nvim_unstable/.config/nvim_unstable/lua/aleidk/plugins/treesitter.lua rename to Configs/nvim/.config/nvim/lua/aleidk/plugins/treesitter.lua diff --git a/Configs/nvim_unstable/.config/nvim_unstable/lua/aleidk/plugins/trouble.lua b/Configs/nvim/.config/nvim/lua/aleidk/plugins/trouble.lua similarity index 100% rename from Configs/nvim_unstable/.config/nvim_unstable/lua/aleidk/plugins/trouble.lua rename to Configs/nvim/.config/nvim/lua/aleidk/plugins/trouble.lua diff --git a/Configs/nvim_unstable/.config/nvim_unstable/snippets/global.json b/Configs/nvim/.config/nvim/snippets/global.json similarity index 100% rename from Configs/nvim_unstable/.config/nvim_unstable/snippets/global.json rename to Configs/nvim/.config/nvim/snippets/global.json diff --git a/Configs/nvim/.config/nvim/after/queries/blade/highlights.scm b/Configs/nvim_old/.config/nvim_old/after/queries/blade/highlights.scm similarity index 100% rename from Configs/nvim/.config/nvim/after/queries/blade/highlights.scm rename to Configs/nvim_old/.config/nvim_old/after/queries/blade/highlights.scm diff --git a/Configs/nvim/.config/nvim/after/queries/blade/injections.scm b/Configs/nvim_old/.config/nvim_old/after/queries/blade/injections.scm similarity index 100% rename from Configs/nvim/.config/nvim/after/queries/blade/injections.scm rename to Configs/nvim_old/.config/nvim_old/after/queries/blade/injections.scm diff --git a/Configs/nvim_old/.config/nvim_old/init.lua b/Configs/nvim_old/.config/nvim_old/init.lua new file mode 100644 index 0000000..2925f22 --- /dev/null +++ b/Configs/nvim_old/.config/nvim_old/init.lua @@ -0,0 +1,7 @@ +-- Loadnoptions before anything +require("aleidk.options") + +require("aleidk.lazy") + +require("aleidk.keymaps") +require("aleidk.autocmds") diff --git a/Configs/nvim_old/.config/nvim_old/lazy-lock.json b/Configs/nvim_old/.config/nvim_old/lazy-lock.json new file mode 100644 index 0000000..507d965 --- /dev/null +++ b/Configs/nvim_old/.config/nvim_old/lazy-lock.json @@ -0,0 +1,57 @@ +{ + "LuaSnip": { "branch": "master", "commit": "0f7bbce41ea152a94d12aea286f2ce98e63c0f58" }, + "blink.cmp": { "branch": "main", "commit": "81069e3955a8b4d5063287a2a6a47a844e9ca2cb" }, + "blink.compat": { "branch": "main", "commit": "08943fdf2eb00432d6205db6d0239434135416bd" }, + "catppuccin": { "branch": "main", "commit": "faf15ab0201b564b6368ffa47b56feefc92ce3f4" }, + "ccc.nvim": { "branch": "main", "commit": "7c639042583c7bdc7ce2e37e5a0e0aa6d0659c6a" }, + "comment-box.nvim": { "branch": "main", "commit": "06bb771690bc9df0763d14769b779062d8f12bc5" }, + "conform.nvim": { "branch": "master", "commit": "a203480a350b03092e473bf3001733d547160a73" }, + "copilot-lualine": { "branch": "main", "commit": "f40450c3e138766026327e7807877ea860618258" }, + "dressing.nvim": { "branch": "master", "commit": "fc78a3ca96f4db9f8893bb7e2fd9823e0780451b" }, + "friendly-snippets": { "branch": "main", "commit": "de8fce94985873666bd9712ea3e49ee17aadb1ed" }, + "gitsigns.nvim": { "branch": "main", "commit": "5f808b5e4fef30bd8aca1b803b4e555da07fc412" }, + "grapple.nvim": { "branch": "main", "commit": "b41ddfc1c39f87f3d1799b99c2f0f1daa524c5f7" }, + "indent-blankline.nvim": { "branch": "master", "commit": "7871a88056f7144defca9c931e311a3134c5d509" }, + "lazy.nvim": { "branch": "main", "commit": "56ead98e05bb37a4ec28930a54d836d033cf00f2" }, + "lazydev.nvim": { "branch": "main", "commit": "f59bd14a852ca43db38e3662395354cb2a9b13e0" }, + "lualine.nvim": { "branch": "master", "commit": "2a5bae925481f999263d6f5ed8361baef8df4f83" }, + "luvit-meta": { "branch": "main", "commit": "57d464c4acb5c2e66bd4145060f5dc9e96a7bbb7" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "43894adcf10bb1190c2184bd7c1750e8ea2b3dce" }, + "mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" }, + "mini.clue": { "branch": "main", "commit": "8e329f586a7cfd06085859066a4b60965fc4ecce" }, + "mini.comment": { "branch": "main", "commit": "03c13e37318bdb18481311c0ac1adc9ed731caf1" }, + "mini.surround": { "branch": "main", "commit": "0e67c4bc147f2a15cee94e7c94dcc0e115b9f55e" }, + "neogen": { "branch": "main", "commit": "dc50715c009f89b8111197fd2f282f6042daa7ea" }, + "noice.nvim": { "branch": "main", "commit": "c6f6fb178ebe9b4fd90383de743c3399f8c3a37c" }, + "nui.nvim": { "branch": "main", "commit": "b58e2bfda5cea347c9d58b7f11cf3012c7b3953f" }, + "nvim-autopairs": { "branch": "master", "commit": "b464658e9b880f463b9f7e6ccddd93fb0013f559" }, + "nvim-lint": { "branch": "master", "commit": "6b46370d02cd001509a765591a3ffc481b538794" }, + "nvim-lspconfig": { "branch": "master", "commit": "4ae9796c4e95ca84ec77946a9f9089b8f1a3eec9" }, + "nvim-notify": { "branch": "master", "commit": "fbef5d32be8466dd76544a257d3f3dce20082a07" }, + "nvim-treesitter": { "branch": "master", "commit": "8d4fdc5e47e2a4e00179e43f56221250ce365973" }, + "nvim-treesitter-context": { "branch": "master", "commit": "6b081ea63a3711243d11540ce28ccdb6f35ecd33" }, + "nvim-treesitter-textobjects": { "branch": "master", "commit": "ad8f0a472148c3e0ae9851e26a722ee4e29b1595" }, + "nvim-ts-autotag": { "branch": "main", "commit": "e239a560f338be31337e7abc3ee42515daf23f5e" }, + "nvim-ts-context-commentstring": { "branch": "main", "commit": "9c74db656c3d0b1c4392fc89a016b1910539e7c0" }, + "nvim-web-devicons": { "branch": "master", "commit": "edbe0a65cfacbbfff6a4a1e98ddd60c28c560509" }, + "overseer.nvim": { "branch": "master", "commit": "10ee48ff96c8d1049efb278ea4c8cf9f3b0e4326" }, + "plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" }, + "remote-nvim.nvim": { "branch": "main", "commit": "66fc20fd259401c7bb6ac5189ecb6283c2eb65d2" }, + "remote-sshfs.nvim": { "branch": "main", "commit": "03f6c40c4032eeb1ab91368e06db9c3f3a97a75d" }, + "render-markdown": { "branch": "main", "commit": "6096cf3608b576a38fd1396227dbc0473091714d" }, + "smart-splits.nvim": { "branch": "master", "commit": "fc7bb00fe67ab504356bed4310d23c2e4cb4b06b" }, + "telescope-fzf-native.nvim": { "branch": "main", "commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b" }, + "telescope.nvim": { "branch": "0.1.x", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" }, + "todo-comments.nvim": { "branch": "main", "commit": "ae0a2afb47cf7395dc400e5dc4e05274bf4fb9e0" }, + "treesj": { "branch": "main", "commit": "03415ac60791d48e120a80d37e080744faf3ac15" }, + "trouble.nvim": { "branch": "main", "commit": "46cf952fc115f4c2b98d4e208ed1e2dce08c9bf6" }, + "ts-node-action": { "branch": "master", "commit": "6d3b60754fd87963d70eadaa2f77873b447eac26" }, + "typescript-tools.nvim": { "branch": "master", "commit": "346062e8cd06e82776b60785a040dfbbdcb6de77" }, + "undotree": { "branch": "master", "commit": "78b5241191852ffa9bb5da5ff2ee033160798c3b" }, + "vim-dadbod": { "branch": "master", "commit": "fe5a55e92b2dded7c404006147ef97fb073d8b1b" }, + "vim-dadbod-completion": { "branch": "master", "commit": "da0e75c09c27a82aad078d993bb1b2f4afd43427" }, + "vim-dadbod-ui": { "branch": "master", "commit": "28a16902cb2134c934b85da5250033ee43b0dee5" }, + "vim-illuminate": { "branch": "master", "commit": "5eeb7951fc630682c322e88a9bbdae5c224ff0aa" }, + "vim-sleuth": { "branch": "master", "commit": "be69bff86754b1aa5adcbb527d7fcd1635a84080" }, + "yazi.nvim": { "branch": "main", "commit": "053867916a9be3cb46f84b6f095ee731bbddd213" } +} diff --git a/Configs/nvim_old/.config/nvim_old/lua/aleidk/autocmds.lua b/Configs/nvim_old/.config/nvim_old/lua/aleidk/autocmds.lua new file mode 100644 index 0000000..22c9fbd --- /dev/null +++ b/Configs/nvim_old/.config/nvim_old/lua/aleidk/autocmds.lua @@ -0,0 +1,10 @@ +-- Highlight on yank +-- See `:help vim.highlight.on_yank()` +local highlight_group = vim.api.nvim_create_augroup("YankHighlight", { clear = true }) +vim.api.nvim_create_autocmd("TextYankPost", { + callback = function() + vim.highlight.on_yank() + end, + group = highlight_group, + pattern = "*", +}) diff --git a/Configs/nvim_unstable/.config/nvim_unstable/lua/aleidk/constants.lua b/Configs/nvim_old/.config/nvim_old/lua/aleidk/constants.lua similarity index 100% rename from Configs/nvim_unstable/.config/nvim_unstable/lua/aleidk/constants.lua rename to Configs/nvim_old/.config/nvim_old/lua/aleidk/constants.lua diff --git a/Configs/nvim_old/.config/nvim_old/lua/aleidk/keymaps.lua b/Configs/nvim_old/.config/nvim_old/lua/aleidk/keymaps.lua new file mode 100644 index 0000000..fde7c73 --- /dev/null +++ b/Configs/nvim_old/.config/nvim_old/lua/aleidk/keymaps.lua @@ -0,0 +1,77 @@ +-- [[ Basic Keymaps ]] + +function MAP(mode, l, r, desc) + vim.keymap.set(mode, l, r, { desc = desc, silent = true }) +end + +function ReloadModule(module) + package.loaded[module] = nil + require(module) +end + +local function default(desc) + return { + silent = true, + desc = desc, + } +end + +local function fixIndentation() + local indent = 2 + vim.opt.tabstop = indent + vim.opt.shiftwidth = indent + vim.opt.softtabstop = indent + + vim.cmd("retab") +end + +-- Keymaps for better default experience +-- See `:help vim.keymap.set()` +vim.keymap.set({ "n", "v" }, "", "", { silent = true }) + +-- vim.keymap.set("n", "", "w", default("Keep cursor centered while junping")) + +-- Remap for dealing with word wrap +vim.keymap.set("n", "k", "v:count == 0 ? 'gk' : 'k'", { expr = true, silent = true }) +vim.keymap.set("n", "j", "v:count == 0 ? 'gj' : 'j'", { expr = true, silent = true }) + +vim.keymap.set("n", "J", "mzJ`z", default("Keep cursor in column while joining lines")) + +vim.keymap.set("n", "|", ":vs", default("Open vsplit")) +vim.keymap.set("n", "°", ":sp", default("Open split")) + +vim.keymap.set("n", "", "zz", default("Keep cursor centered while junping")) +vim.keymap.set("n", "", "zz", default("Keep cursor centered while junping")) + +vim.keymap.set("n", "n", "nzzzv", default("Keep cursor centered while searching")) +vim.keymap.set("n", "N", "Nzzzv", default("Keep cursor centered while searching")) + +vim.keymap.set("n", "Q", "", {}) + +vim.keymap.set( + "n", + "rw", + [[:%s/\<\>//gI]], + default("Search and replace current word") +) + +-- vim.keymap.set("n", "rR", ":s/", default("Search and replace inline")) +-- vim.keymap.set("n", "rr", ":%s/", default("Search and replace globally")) +-- vim.keymap.set("v", "r", ":s/", default("Search and replace in selection")) + +vim.keymap.set("v", "p", [["_dP]], default("Paste without lossing yanked text")) + +vim.keymap.set("v", "J", ":m '>+1gv=gv", default("Move selection down")) +vim.keymap.set("v", "K", ":m '<-2gv=gv", default("Move selection up")) +vim.keymap.set("n", "uI", fixIndentation, default("Fix indentation")) +vim.keymap.set("n", "uO", function() ReloadModule('aleidk.options') end, + default("Reload the options configuration")) + +vim.keymap.set("n", "uh", ":nohl", default("Remove search highlight")) + +vim.keymap.set("t", "", "", default("Exit insert mode on terminal")) + +vim.keymap.set("n", "bc", "bd", default("Close buffer")) +vim.keymap.set("n", "bh", "bp", default("Prev buffer")) +vim.keymap.set("n", "bl", "bn", default("Next buffer")) +vim.keymap.set("n", "bA", "bufdo bd", default("Close all buffers")) diff --git a/Configs/nvim/.config/nvim/lua/aleidk/lazy.lua b/Configs/nvim_old/.config/nvim_old/lua/aleidk/lazy.lua similarity index 100% rename from Configs/nvim/.config/nvim/lua/aleidk/lazy.lua rename to Configs/nvim_old/.config/nvim_old/lua/aleidk/lazy.lua diff --git a/Configs/nvim_old/.config/nvim_old/lua/aleidk/options.lua b/Configs/nvim_old/.config/nvim_old/lua/aleidk/options.lua new file mode 100644 index 0000000..6378dc5 --- /dev/null +++ b/Configs/nvim_old/.config/nvim_old/lua/aleidk/options.lua @@ -0,0 +1,144 @@ +-- [[ Setting options ]] +-- See `:help vim.o` + +-- Set as the leader key +vim.g.mapleader = " " +vim.g.maplocalleader = " " + +vim.o.diffopt = "vertical,closeoff,filler" + +local opt = vim.opt + +-- stylua: ignore +opt.autowrite = true -- Enable auto write +opt.clipboard = "unnamedplus" -- Sync with system clipboard +opt.completeopt = "menu,menuone,noselect" +opt.conceallevel = 2 -- Hide * markup for bold and italic +opt.confirm = true -- Confirm to save changes before exiting modified buffer +opt.cursorline = true -- Enable highlighting of the current line +opt.expandtab = true -- Use spaces instead of tabs +opt.formatoptions = "jcroqlnt" -- tcqj +opt.grepformat = "%f:%l:%c:%m" +opt.grepprg = "rg --vimgrep" +opt.ignorecase = true -- Ignore case +opt.inccommand = "nosplit" -- preview incremental substitute +opt.laststatus = 0 +opt.list = true -- Show some invisible characters (tabs... +opt.mouse = "a" -- Enable mouse mode +opt.number = true -- Print line number +opt.pumblend = 10 -- Popup blend +opt.pumheight = 10 -- Maximum number of entries in a popup +opt.relativenumber = true -- Relative line numbers +opt.scrolloff = 15 -- Lines of context +opt.sessionoptions = { "buffers", "curdir", "tabpages", "winsize" } +opt.shiftround = true -- Round indent +opt.shiftwidth = 2 -- Size of an indent +-- opt.shortmess:append({ W = true, I = true, c = true }) -- INFO: this control the format of some messages +opt.showmode = false -- Dont show mode since we have a statusline +opt.sidescrolloff = 8 -- Columns of context +opt.signcolumn = "yes" -- Always show the signcolumn, otherwise it would shift the text each time +opt.smartcase = true -- Don't ignore case with capitals +opt.smartindent = true -- Insert indents automatically +opt.spelllang = { "en" } +opt.splitbelow = true -- Put new windows below current +opt.splitright = true -- Put new windows right of current +opt.tabstop = 2 -- Number of spaces tabs count for +opt.termguicolors = true -- True color support +opt.timeoutlen = 300 +opt.undofile = true +opt.undolevels = 10000 +opt.updatetime = 200 -- Save swap file and trigger CursorHold +opt.wildmode = "longest,list:full" -- Command-line completion mode +opt.winminwidth = 5 -- Minimum window width +opt.wrap = false -- Disable line wrap + +vim.o.sessionoptions = "blank,buffers,curdir,folds,help,tabpages,winsize,winpos,terminal,localoptions" + +local fn = vim.fn + +-- Quickfix customization +function _G.qftf(info) + local items + local ret = {} + -- The name of item in list is based on the directory of quickfix window. + -- Change the directory for quickfix window make the name of item shorter. + -- It's a good opportunity to change current directory in quickfixtextfunc :) + -- + -- local alterBufnr = fn.bufname('#') -- alternative buffer is the buffer before enter qf window + -- local root = getRootByAlterBufnr(alterBufnr) + -- vim.cmd(('noa lcd %s'):format(fn.fnameescape(root))) + -- + if info.quickfix == 1 then + items = fn.getqflist({ id = info.id, items = 0 }).items + else + items = fn.getloclist(info.winid, { id = info.id, items = 0 }).items + end + local limit = 31 + local fnameFmt1, fnameFmt2 = "%-" .. limit .. "s", "…%." .. (limit - 1) .. "s" + local validFmt = "%s │%5d:%-3d│%s %s" + for i = info.start_idx, info.end_idx do + local e = items[i] + local fname = "" + local str + if e.valid == 1 then + if e.bufnr > 0 then + fname = fn.bufname(e.bufnr) + if fname == "" then + fname = "[No Name]" + else + fname = fname:gsub("^" .. vim.env.HOME, "~") + end + -- char in fname may occur more than 1 width, ignore this issue in order to keep performance + if #fname <= limit then + fname = fnameFmt1:format(fname) + else + fname = fnameFmt2:format(fname:sub(1 - limit)) + end + end + local lnum = e.lnum > 99999 and -1 or e.lnum + local col = e.col > 999 and -1 or e.col + local qtype = e.type == "" and "" or " " .. e.type:sub(1, 1):upper() + str = validFmt:format(fname, lnum, col, qtype, e.text) + else + str = e.text + end + table.insert(ret, str) + end + return ret +end + +-- TODO: how to customize? +vim.o.qftf = "{info -> v:lua._G.qftf(info)}" + +vim.filetype.add({ + -- Detect and assign filetype based on the extension of the filename + extension = { + mdx = "mdx", + log = "log", + conf = "conf", + env = "dotenv" + }, + -- Detect and apply filetypes based on the entire filename + filename = { + [".env"] = "dotenv", + ["env"] = "dotenv", + ["tsconfig.json"] = "jsonc", + }, + -- Detect and apply filetypes based on certain patterns of the filenames + pattern = { + -- INFO: Match filenames like - ".env.example", ".env.local" and so on + ["%.env%.[%w_.-]+"] = "dotenv", + [".*%.blade%.php"] = "blade", + [".*%.hurl.*"] = "hurl", + [".*/hypr/.*%.conf"] = "hyprlang", + ['.*/systemd/.*%.(%a+)'] = function(path, bufnr, ext) + vim.print(ext) + local allowed = { "container", "volume", "network", "build", "pod", "kube" } + for _, v in ipairs(allowed) do + if v == ext then + return "ini" + end + end + end, + }, +}) diff --git a/Configs/nvim/.config/nvim/lua/aleidk/plugins-base/auto-pairs.lua b/Configs/nvim_old/.config/nvim_old/lua/aleidk/plugins-base/auto-pairs.lua similarity index 100% rename from Configs/nvim/.config/nvim/lua/aleidk/plugins-base/auto-pairs.lua rename to Configs/nvim_old/.config/nvim_old/lua/aleidk/plugins-base/auto-pairs.lua diff --git a/Configs/nvim/.config/nvim/lua/aleidk/plugins-base/bookmarks.lua b/Configs/nvim_old/.config/nvim_old/lua/aleidk/plugins-base/bookmarks.lua similarity index 100% rename from Configs/nvim/.config/nvim/lua/aleidk/plugins-base/bookmarks.lua rename to Configs/nvim_old/.config/nvim_old/lua/aleidk/plugins-base/bookmarks.lua diff --git a/Configs/nvim/.config/nvim/lua/aleidk/plugins-base/comments.lua b/Configs/nvim_old/.config/nvim_old/lua/aleidk/plugins-base/comments.lua similarity index 100% rename from Configs/nvim/.config/nvim/lua/aleidk/plugins-base/comments.lua rename to Configs/nvim_old/.config/nvim_old/lua/aleidk/plugins-base/comments.lua diff --git a/Configs/nvim/.config/nvim/lua/aleidk/plugins-base/file-explorer.lua b/Configs/nvim_old/.config/nvim_old/lua/aleidk/plugins-base/file-explorer.lua similarity index 100% rename from Configs/nvim/.config/nvim/lua/aleidk/plugins-base/file-explorer.lua rename to Configs/nvim_old/.config/nvim_old/lua/aleidk/plugins-base/file-explorer.lua diff --git a/Configs/nvim/.config/nvim/lua/aleidk/plugins-base/indent-blankline.lua b/Configs/nvim_old/.config/nvim_old/lua/aleidk/plugins-base/indent-blankline.lua similarity index 100% rename from Configs/nvim/.config/nvim/lua/aleidk/plugins-base/indent-blankline.lua rename to Configs/nvim_old/.config/nvim_old/lua/aleidk/plugins-base/indent-blankline.lua diff --git a/Configs/nvim/.config/nvim/lua/aleidk/plugins-base/treesitter.lua b/Configs/nvim_old/.config/nvim_old/lua/aleidk/plugins-base/treesitter.lua similarity index 100% rename from Configs/nvim/.config/nvim/lua/aleidk/plugins-base/treesitter.lua rename to Configs/nvim_old/.config/nvim_old/lua/aleidk/plugins-base/treesitter.lua diff --git a/Configs/nvim/.config/nvim/lua/aleidk/plugins-base/ui.lua b/Configs/nvim_old/.config/nvim_old/lua/aleidk/plugins-base/ui.lua similarity index 100% rename from Configs/nvim/.config/nvim/lua/aleidk/plugins-base/ui.lua rename to Configs/nvim_old/.config/nvim_old/lua/aleidk/plugins-base/ui.lua diff --git a/Configs/nvim/.config/nvim/lua/aleidk/plugins-base/undo-tree.lua b/Configs/nvim_old/.config/nvim_old/lua/aleidk/plugins-base/undo-tree.lua similarity index 100% rename from Configs/nvim/.config/nvim/lua/aleidk/plugins-base/undo-tree.lua rename to Configs/nvim_old/.config/nvim_old/lua/aleidk/plugins-base/undo-tree.lua diff --git a/Configs/nvim/.config/nvim/lua/aleidk/plugins-core/colorscheme.lua b/Configs/nvim_old/.config/nvim_old/lua/aleidk/plugins-core/colorscheme.lua similarity index 100% rename from Configs/nvim/.config/nvim/lua/aleidk/plugins-core/colorscheme.lua rename to Configs/nvim_old/.config/nvim_old/lua/aleidk/plugins-core/colorscheme.lua diff --git a/Configs/nvim/.config/nvim/lua/aleidk/plugins-core/init.lua b/Configs/nvim_old/.config/nvim_old/lua/aleidk/plugins-core/init.lua similarity index 100% rename from Configs/nvim/.config/nvim/lua/aleidk/plugins-core/init.lua rename to Configs/nvim_old/.config/nvim_old/lua/aleidk/plugins-core/init.lua diff --git a/Configs/nvim/.config/nvim/lua/aleidk/plugins-core/key-help.lua b/Configs/nvim_old/.config/nvim_old/lua/aleidk/plugins-core/key-help.lua similarity index 100% rename from Configs/nvim/.config/nvim/lua/aleidk/plugins-core/key-help.lua rename to Configs/nvim_old/.config/nvim_old/lua/aleidk/plugins-core/key-help.lua diff --git a/Configs/nvim/.config/nvim/lua/aleidk/plugins-core/lualine.lua b/Configs/nvim_old/.config/nvim_old/lua/aleidk/plugins-core/lualine.lua similarity index 100% rename from Configs/nvim/.config/nvim/lua/aleidk/plugins-core/lualine.lua rename to Configs/nvim_old/.config/nvim_old/lua/aleidk/plugins-core/lualine.lua diff --git a/Configs/nvim/.config/nvim/lua/aleidk/plugins-core/markdown.lua b/Configs/nvim_old/.config/nvim_old/lua/aleidk/plugins-core/markdown.lua similarity index 100% rename from Configs/nvim/.config/nvim/lua/aleidk/plugins-core/markdown.lua rename to Configs/nvim_old/.config/nvim_old/lua/aleidk/plugins-core/markdown.lua diff --git a/Configs/nvim/.config/nvim/lua/aleidk/plugins-core/smart-splits.lua b/Configs/nvim_old/.config/nvim_old/lua/aleidk/plugins-core/smart-splits.lua similarity index 100% rename from Configs/nvim/.config/nvim/lua/aleidk/plugins-core/smart-splits.lua rename to Configs/nvim_old/.config/nvim_old/lua/aleidk/plugins-core/smart-splits.lua diff --git a/Configs/nvim/.config/nvim/lua/aleidk/plugins-core/surround.lua b/Configs/nvim_old/.config/nvim_old/lua/aleidk/plugins-core/surround.lua similarity index 100% rename from Configs/nvim/.config/nvim/lua/aleidk/plugins-core/surround.lua rename to Configs/nvim_old/.config/nvim_old/lua/aleidk/plugins-core/surround.lua diff --git a/Configs/nvim/.config/nvim/lua/aleidk/plugins-core/telescope.lua b/Configs/nvim_old/.config/nvim_old/lua/aleidk/plugins-core/telescope.lua similarity index 100% rename from Configs/nvim/.config/nvim/lua/aleidk/plugins-core/telescope.lua rename to Configs/nvim_old/.config/nvim_old/lua/aleidk/plugins-core/telescope.lua diff --git a/Configs/nvim/.config/nvim/lua/aleidk/plugins-core/todo-comments.lua b/Configs/nvim_old/.config/nvim_old/lua/aleidk/plugins-core/todo-comments.lua similarity index 100% rename from Configs/nvim/.config/nvim/lua/aleidk/plugins-core/todo-comments.lua rename to Configs/nvim_old/.config/nvim_old/lua/aleidk/plugins-core/todo-comments.lua diff --git a/Configs/nvim/.config/nvim/lua/aleidk/plugins-ide/color-picker.lua b/Configs/nvim_old/.config/nvim_old/lua/aleidk/plugins-ide/color-picker.lua similarity index 100% rename from Configs/nvim/.config/nvim/lua/aleidk/plugins-ide/color-picker.lua rename to Configs/nvim_old/.config/nvim_old/lua/aleidk/plugins-ide/color-picker.lua diff --git a/Configs/nvim/.config/nvim/lua/aleidk/plugins-ide/completion.lua b/Configs/nvim_old/.config/nvim_old/lua/aleidk/plugins-ide/completion.lua similarity index 100% rename from Configs/nvim/.config/nvim/lua/aleidk/plugins-ide/completion.lua rename to Configs/nvim_old/.config/nvim_old/lua/aleidk/plugins-ide/completion.lua diff --git a/Configs/nvim/.config/nvim/lua/aleidk/plugins-ide/database.lua b/Configs/nvim_old/.config/nvim_old/lua/aleidk/plugins-ide/database.lua similarity index 100% rename from Configs/nvim/.config/nvim/lua/aleidk/plugins-ide/database.lua rename to Configs/nvim_old/.config/nvim_old/lua/aleidk/plugins-ide/database.lua diff --git a/Configs/nvim/.config/nvim/lua/aleidk/plugins-ide/doc-gen.lua b/Configs/nvim_old/.config/nvim_old/lua/aleidk/plugins-ide/doc-gen.lua similarity index 100% rename from Configs/nvim/.config/nvim/lua/aleidk/plugins-ide/doc-gen.lua rename to Configs/nvim_old/.config/nvim_old/lua/aleidk/plugins-ide/doc-gen.lua diff --git a/Configs/nvim/.config/nvim/lua/aleidk/plugins-ide/formatter.lua b/Configs/nvim_old/.config/nvim_old/lua/aleidk/plugins-ide/formatter.lua similarity index 100% rename from Configs/nvim/.config/nvim/lua/aleidk/plugins-ide/formatter.lua rename to Configs/nvim_old/.config/nvim_old/lua/aleidk/plugins-ide/formatter.lua diff --git a/Configs/nvim/.config/nvim/lua/aleidk/plugins-ide/git.lua b/Configs/nvim_old/.config/nvim_old/lua/aleidk/plugins-ide/git.lua similarity index 100% rename from Configs/nvim/.config/nvim/lua/aleidk/plugins-ide/git.lua rename to Configs/nvim_old/.config/nvim_old/lua/aleidk/plugins-ide/git.lua diff --git a/Configs/nvim/.config/nvim/lua/aleidk/plugins-ide/init.lua b/Configs/nvim_old/.config/nvim_old/lua/aleidk/plugins-ide/init.lua similarity index 100% rename from Configs/nvim/.config/nvim/lua/aleidk/plugins-ide/init.lua rename to Configs/nvim_old/.config/nvim_old/lua/aleidk/plugins-ide/init.lua diff --git a/Configs/nvim/.config/nvim/lua/aleidk/plugins-ide/linters.lua b/Configs/nvim_old/.config/nvim_old/lua/aleidk/plugins-ide/linters.lua similarity index 100% rename from Configs/nvim/.config/nvim/lua/aleidk/plugins-ide/linters.lua rename to Configs/nvim_old/.config/nvim_old/lua/aleidk/plugins-ide/linters.lua diff --git a/Configs/nvim/.config/nvim/lua/aleidk/plugins-ide/lsp.lua b/Configs/nvim_old/.config/nvim_old/lua/aleidk/plugins-ide/lsp.lua similarity index 100% rename from Configs/nvim/.config/nvim/lua/aleidk/plugins-ide/lsp.lua rename to Configs/nvim_old/.config/nvim_old/lua/aleidk/plugins-ide/lsp.lua diff --git a/Configs/nvim/.config/nvim/lua/aleidk/plugins-ide/luasnip.lua b/Configs/nvim_old/.config/nvim_old/lua/aleidk/plugins-ide/luasnip.lua similarity index 100% rename from Configs/nvim/.config/nvim/lua/aleidk/plugins-ide/luasnip.lua rename to Configs/nvim_old/.config/nvim_old/lua/aleidk/plugins-ide/luasnip.lua diff --git a/Configs/nvim/.config/nvim/lua/aleidk/plugins-ide/remote-sshfs.lua b/Configs/nvim_old/.config/nvim_old/lua/aleidk/plugins-ide/remote-sshfs.lua similarity index 100% rename from Configs/nvim/.config/nvim/lua/aleidk/plugins-ide/remote-sshfs.lua rename to Configs/nvim_old/.config/nvim_old/lua/aleidk/plugins-ide/remote-sshfs.lua diff --git a/Configs/nvim/.config/nvim/lua/aleidk/plugins-ide/task-runner.lua b/Configs/nvim_old/.config/nvim_old/lua/aleidk/plugins-ide/task-runner.lua similarity index 100% rename from Configs/nvim/.config/nvim/lua/aleidk/plugins-ide/task-runner.lua rename to Configs/nvim_old/.config/nvim_old/lua/aleidk/plugins-ide/task-runner.lua diff --git a/Configs/nvim/.config/nvim/lua/aleidk/plugins-ide/trouble.lua b/Configs/nvim_old/.config/nvim_old/lua/aleidk/plugins-ide/trouble.lua similarity index 100% rename from Configs/nvim/.config/nvim/lua/aleidk/plugins-ide/trouble.lua rename to Configs/nvim_old/.config/nvim_old/lua/aleidk/plugins-ide/trouble.lua diff --git a/Configs/nvim/.config/nvim/lua/aleidk/plugins-ide/typescript-tools.lua b/Configs/nvim_old/.config/nvim_old/lua/aleidk/plugins-ide/typescript-tools.lua similarity index 100% rename from Configs/nvim/.config/nvim/lua/aleidk/plugins-ide/typescript-tools.lua rename to Configs/nvim_old/.config/nvim_old/lua/aleidk/plugins-ide/typescript-tools.lua diff --git a/Configs/nvim/.config/nvim/lua/aleidk/utils.lua b/Configs/nvim_old/.config/nvim_old/lua/aleidk/utils.lua similarity index 100% rename from Configs/nvim/.config/nvim/lua/aleidk/utils.lua rename to Configs/nvim_old/.config/nvim_old/lua/aleidk/utils.lua diff --git a/Configs/nvim_unstable/.config/nvim_unstable/init.lua b/Configs/nvim_unstable/.config/nvim_unstable/init.lua deleted file mode 100644 index 149787a..0000000 --- a/Configs/nvim_unstable/.config/nvim_unstable/init.lua +++ /dev/null @@ -1,33 +0,0 @@ --- Bootstrap lazy.nvim -local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" -if not (vim.uv or vim.loop).fs_stat(lazypath) then - local lazyrepo = "https://github.com/folke/lazy.nvim.git" - local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) - if vim.v.shell_error ~= 0 then - vim.api.nvim_echo({ - { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, - { out, "WarningMsg" }, - { "\nPress any key to exit..." }, - }, true, {}) - vim.fn.getchar() - os.exit(1) - end -end -vim.opt.rtp:prepend(lazypath) - -require("aleidk.options") -require("aleidk.autocmds") -require("aleidk.keymaps") - --- Setup lazy.nvim -require("lazy").setup({ - spec = { - -- import your plugins - { import = "aleidk/plugins" }, - }, - -- Configure any other settings here. See the documentation for more details. - -- colorscheme that will be used when installing plugins. - install = { colorscheme = { "habamax" } }, - -- automatically check for plugin updates --- checker = { enabled = true }, -}) diff --git a/Configs/nvim_unstable/.config/nvim_unstable/lazy-lock.json b/Configs/nvim_unstable/.config/nvim_unstable/lazy-lock.json deleted file mode 100644 index f053560..0000000 --- a/Configs/nvim_unstable/.config/nvim_unstable/lazy-lock.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "blink.cmp": { "branch": "main", "commit": "022521a8910a5543b0251b21c9e1a1e989745796" }, - "blink.compat": { "branch": "main", "commit": "2ed6d9a28b07fa6f3bface818470605f8896408c" }, - "catppuccin": { "branch": "main", "commit": "8162a4bd9afb42837a655e404d1f937a87ba95e6" }, - "comment-box.nvim": { "branch": "main", "commit": "06bb771690bc9df0763d14769b779062d8f12bc5" }, - "conform.nvim": { "branch": "master", "commit": "6feb2f28f9a9385e401857b21eeac3c1b66dd628" }, - "friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" }, - "fzf-lua": { "branch": "main", "commit": "8adf950093af5361621cf52208d64995b1af78b5" }, - "grapple.nvim": { "branch": "main", "commit": "b41ddfc1c39f87f3d1799b99c2f0f1daa524c5f7" }, - "indent-blankline.nvim": { "branch": "master", "commit": "005b56001b2cb30bfa61b7986bc50657816ba4ba" }, - "lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" }, - "lazydev.nvim": { "branch": "main", "commit": "2367a6c0a01eb9edb0464731cc0fb61ed9ab9d2c" }, - "mason.nvim": { "branch": "main", "commit": "9eaedb864cdadc29c6eb7d761a6c0d8aee26c91b" }, - "mini.nvim": { "branch": "main", "commit": "94cae4660a8b2d95dbbd56e1fbc6fcfa2716d152" }, - "neogen": { "branch": "main", "commit": "b2e78708876f4da507839726816010a68e33fec8" }, - "nvim-lint": { "branch": "master", "commit": "f3a55c8da6317327a08b698018b786f8c4dce691" }, - "nvim-lspconfig": { "branch": "master", "commit": "f610208989e9c03561f9f601db3133f6ae398fcd" }, - "nvim-treesitter": { "branch": "master", "commit": "066fd6505377e3fd4aa219e61ce94c2b8bdb0b79" }, - "nvim-treesitter-context": { "branch": "master", "commit": "4976d8b90401cba9b85f6861e4e5a6edef2f2086" }, - "nvim-ts-context-commentstring": { "branch": "main", "commit": "1b212c2eee76d787bbea6aa5e92a2b534e7b4f8f" }, - "nvim-web-devicons": { "branch": "master", "commit": "1fb58cca9aebbc4fd32b086cb413548ce132c127" }, - "plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" }, - "remote-sshfs.nvim": { "branch": "main", "commit": "01b89636d18a65f8bbd77749aecf4fc124e051aa" }, - "render-markdown": { "branch": "main", "commit": "dac01bd6660af337613e8cfcb23a4aec5d3c0e38" }, - "smart-splits.nvim": { "branch": "master", "commit": "3af62ec991b972379833022c496abe96d727aa35" }, - "telescope.nvim": { "branch": "master", "commit": "b4da76be54691e854d3e0e02c36b0245f945c2c7" }, - "trouble.nvim": { "branch": "main", "commit": "85bedb7eb7fa331a2ccbecb9202d8abba64d37b3" }, - "ts-node-action": { "branch": "master", "commit": "bfaa787cc85d753af3c19245b4142ed727a534b5" }, - "typescript-tools.nvim": { "branch": "master", "commit": "3c501d7c7f79457932a8750a2a1476a004c5c1a9" }, - "vim-dadbod": { "branch": "master", "commit": "e95afed23712f969f83b4857a24cf9d59114c2e6" }, - "vim-dadbod-completion": { "branch": "master", "commit": "a8dac0b3cf6132c80dc9b18bef36d4cf7a9e1fe6" }, - "vim-dadbod-ui": { "branch": "master", "commit": "460432301a5cb280ea265ddfa15c9f3dcd1d26b7" }, - "vim-sleuth": { "branch": "master", "commit": "be69bff86754b1aa5adcbb527d7fcd1635a84080" }, - "yazi.nvim": { "branch": "main", "commit": "454525c33339881c574c2f35f488a13d0d6a1491" } -} diff --git a/Configs/nvim_unstable/.config/nvim_unstable/lua/aleidk/autocmds.lua b/Configs/nvim_unstable/.config/nvim_unstable/lua/aleidk/autocmds.lua deleted file mode 100644 index 9e7e188..0000000 --- a/Configs/nvim_unstable/.config/nvim_unstable/lua/aleidk/autocmds.lua +++ /dev/null @@ -1,34 +0,0 @@ -vim.api.nvim_create_autocmd('LspAttach', { - callback = function(args) - local client = vim.lsp.get_client_by_id(args.data.client_id) - - if not client then - return - end - - vim.bo[args.buf].omnifunc = 'v:lua.MiniCompletion.completefunc_lsp' - - -- Prefer LSP folding if client supports it - if client:supports_method('textDocument/foldingRange') then - local win = vim.api.nvim_get_current_win() - vim.wo[win][0].foldexpr = 'v:lua.vim.lsp.foldexpr()' - end - - vim.keymap.set({ "n", "x", "v" }, "la", vim.lsp.buf.code_action, { buffer = args.buf, desc = "Code Action" }) - vim.keymap.set({ "n", "x", "v" }, "ld", vim.diagnostic.open_float, { desc = "Show diagnostic under cursor" }) - vim.keymap.set({ "n", "x", "v" }, "lc", function() - local curpos = vim.fn.getcurpos() - local diagnostics = vim.diagnostic.get(0, { lnum = curpos[2] - 1 }) - - if #diagnostics == 0 then - vim.notify("No diagnostic under cursor") - return - end - - local diagnostic = diagnostics[1] - local msg = string.format("%s [%s]: %s", diagnostic.source, diagnostic.code, diagnostic.message) - vim.fn.setreg("+", msg) - vim.notify("Diagnostic saved to clipboard:\n\n" .. msg) - end, { buffer = args.buf, desc = "Copy diagnostic to clipboard" }) - end, -}) diff --git a/Configs/nvim_unstable/.config/nvim_unstable/lua/aleidk/keymaps.lua b/Configs/nvim_unstable/.config/nvim_unstable/lua/aleidk/keymaps.lua deleted file mode 100644 index f7a3019..0000000 --- a/Configs/nvim_unstable/.config/nvim_unstable/lua/aleidk/keymaps.lua +++ /dev/null @@ -1,34 +0,0 @@ --- stylua: ignore start --- QoL normalization's -vim.keymap.set("n", "Q", "", {}) -vim.keymap.set({ "n", "v" }, "", "", { desc = "Prevent cursor movement", silent = true }) -vim.keymap.set("n", "k", "v:count == 0 ? 'gk' : 'k'", - { desc = "Move cursor regardless of word wrap", expr = true, silent = true }) -vim.keymap.set("n", "j", "v:count == 0 ? 'gj' : 'j'", - { desc = "Move cursor regardless of word wrap", expr = true, silent = true }) -vim.keymap.set("n", "J", "mzJ`z", { desc = "Keep cursor in column while joining lines", silent = true }) - --- vim.keymap.set("n", "", "zz", { desc = "Keep cursor centered while junping", silent = true }) --- vim.keymap.set("n", "", "zz", { desc = "Keep cursor centered while junping", silent = true }) --- vim.keymap.set("n", "n", "nzzzv", { desc = "Keep cursor centered while searching", silent = true }) --- vim.keymap.set("n", "N", "Nzzzv", { desc = "Keep cursor centered while searching", silent = true }) - --- Utils -vim.keymap.set("n", "|", ":vs", { desc = "Create vsplit", silent = true }) -vim.keymap.set("n", "°", ":sp", { desc = "Create split", silent = true }) - -vim.keymap.set("v", "p", [["_dP]], { desc = "Paste without lossing yanked text", silent = true }) -vim.keymap.set("n", "uh", ":nohl", { desc = "Remove search highlight", silent = true }) - --- Buffer manipulation -vim.keymap.set("n", "bc", "bd", { desc = "Close buffer", silent = true }) -vim.keymap.set("n", "bh", "bp", { desc = "Prev buffer", silent = true }) -vim.keymap.set("n", "bl", "bn", { desc = "Next buffer", silent = true }) -vim.keymap.set("n", "bA", "bufdo bd", { desc = "Close all buffers", silent = true }) - -vim.keymap.set("n", "", "h", { desc = "Move to left window", silent = true }) -vim.keymap.set("n", "", "j", { desc = "Move to bottom window", silent = true }) -vim.keymap.set("n", "", "k", { desc = "Move to top window", silent = true }) -vim.keymap.set("n", "", "l", { desc = "Move to right window", silent = true }) - --- stylua: ignore end diff --git a/Configs/nvim_unstable/.config/nvim_unstable/lua/aleidk/options.lua b/Configs/nvim_unstable/.config/nvim_unstable/lua/aleidk/options.lua deleted file mode 100644 index f7b0ff6..0000000 --- a/Configs/nvim_unstable/.config/nvim_unstable/lua/aleidk/options.lua +++ /dev/null @@ -1,161 +0,0 @@ --- [[ Setting options ]] --- See `:help vim.o` - --- Set as the leader key -vim.g.mapleader = " " -vim.g.maplocalleader = " " - -vim.o.diffopt = "vertical,closeoff,filler" - -local opt = vim.opt - -vim.schedule(function() - vim.opt.clipboard = 'unnamedplus' -end) - -vim.o.winborder = 'rounded' -opt.breakindent = true -- Every wrapped line will continue visually indented -opt.autowrite = true -- Enable auto write --- opt.completeopt = "menu,menuone,noselect" -vim.o.completeopt = 'noselect,menu,menuone,noinsert,popup' -opt.conceallevel = 2 -- Hide * markup for bold and italic -opt.confirm = true -- Confirm to save changes before exiting modified buffer -opt.cursorline = true -- Enable highlighting of the current line -opt.expandtab = true -- Use spaces instead of tabs -opt.formatoptions = "jcroqlnt" -- tcqj -opt.grepformat = "%f:%l:%c:%m" -opt.grepprg = "rg --vimgrep" -opt.ignorecase = true -- Ignore case -opt.inccommand = "nosplit" -- preview incremental substitute -opt.laststatus = 0 -vim.opt.list = true -- Sets how neovim will display certain whitespace characters in the editor. -vim.opt.listchars = { tab = '» ', trail = '·', nbsp = '␣' } -opt.mouse = "a" -- Enable mouse mode -opt.number = true -- Print line number -opt.pumblend = 10 -- Popup blend -opt.pumheight = 10 -- Maximum number of entries in a popup -opt.relativenumber = true -- Relative line numbers -opt.scrolloff = 15 -- Lines of context -opt.sessionoptions = { "buffers", "curdir", "tabpages", "winsize" } -opt.shiftround = true -- Round indent -opt.shiftwidth = 2 -- Size of an indent --- opt.shortmess:append({ W = true, I = true, c = true }) -- INFO: this control the format of some messages -opt.showmode = false -- Don't show mode since we have a statusline -opt.sidescrolloff = 8 -- Columns of context -opt.signcolumn = "yes" -- Always show the signcolumn, otherwise it would shift the text each time -opt.smartcase = true -- Don't ignore case with capitals -opt.smartindent = true -- Insert indents automatically -opt.spelllang = { "en" } -opt.splitbelow = true -- Put new windows below current -opt.splitright = true -- Put new windows right of current -opt.tabstop = 2 -- Number of spaces tabs count for -opt.termguicolors = true -- True color support -opt.undofile = true -opt.undolevels = 10000 -opt.updatetime = 200 -- Save swap file and trigger CursorHold -opt.wildmode = "longest,list:full" -- Command-line completion mode -opt.winminwidth = 5 -- Minimum window width -opt.wrap = false -- Disable line wrap -vim.opt.inccommand = 'split' -- Preview substitutions live, as you type! - -vim.o.sessionoptions = "blank,buffers,curdir,folds,help,tabpages,winsize,winpos,terminal,localoptions" - --- Nice and simple folding: -vim.o.foldenable = true -vim.o.foldlevel = 99 -vim.o.foldmethod = "expr" -vim.o.foldexpr = "v:lua.vim.treesitter.foldexpr()" -vim.opt.fillchars:append({ fold = " " }) - -local fn = vim.fn - --- Quickfix customization -function _G.qftf(info) - local items - local ret = {} - -- The name of item in list is based on the directory of quickfix window. - -- Change the directory for quickfix window make the name of item shorter. - -- It's a good opportunity to change current directory in quickfixtextfunc :) - -- - -- local alterBufnr = fn.bufname('#') -- alternative buffer is the buffer before enter qf window - -- local root = getRootByAlterBufnr(alterBufnr) - -- vim.cmd(('noa lcd %s'):format(fn.fnameescape(root))) - -- - if info.quickfix == 1 then - items = fn.getqflist({ id = info.id, items = 0 }).items - else - items = fn.getloclist(info.winid, { id = info.id, items = 0 }).items - end - local limit = 31 - local fnameFmt1, fnameFmt2 = "%-" .. limit .. "s", "…%." .. (limit - 1) .. "s" - local validFmt = "%s │%5d:%-3d│%s %s" - for i = info.start_idx, info.end_idx do - local e = items[i] - local fname = "" - local str - if e.valid == 1 then - if e.bufnr > 0 then - fname = fn.bufname(e.bufnr) - if fname == "" then - fname = "[No Name]" - else - fname = fname:gsub("^" .. vim.env.HOME, "~") - end - -- char in fname may occur more than 1 width, ignore this issue in order to keep performance - if #fname <= limit then - fname = fnameFmt1:format(fname) - else - fname = fnameFmt2:format(fname:sub(1 - limit)) - end - end - local lnum = e.lnum > 99999 and -1 or e.lnum - local col = e.col > 999 and -1 or e.col - local qtype = e.type == "" and "" or " " .. e.type:sub(1, 1):upper() - str = validFmt:format(fname, lnum, col, qtype, e.text) - else - str = e.text - end - table.insert(ret, str) - end - return ret -end - --- TODO: how to customize? -vim.o.qftf = "{info -> v:lua._G.qftf(info)}" - -vim.filetype.add({ - -- Detect and assign filetype based on the extension of the filename - extension = { - mdx = "mdx", - log = "log", - conf = "conf", - env = "dotenv", - }, - -- Detect and apply filetypes based on the entire filename - filename = { - [".env"] = "dotenv", - ["env"] = "dotenv", - ["tsconfig.json"] = "jsonc", - }, - -- Detect and apply filetypes based on certain patterns of the filenames - pattern = { - -- INFO: Match filenames like - ".env.example", ".env.local" and so on - ["%.env%.[%w_.-]+"] = "dotenv", - [".*%.blade%.php"] = "blade", - [".*%.hurl.*"] = "hurl", - [".*/hypr/.*%.conf"] = "hyprlang", - }, -}) - --- ╭─────────────────────────────────────────────────────────╮ --- │ LSP │ --- ╰─────────────────────────────────────────────────────────╯ - -vim.lsp.enable({ - "rust_analyzer", - "lua_ls", -}) - -vim.diagnostic.config({ - virtual_lines = { current_line = true }, -})