diff --git a/init.lua b/init.lua index 9a3b909..a2ddcd4 100644 --- a/init.lua +++ b/init.lua @@ -184,6 +184,13 @@ require('lazy').setup({ }, }, require('plugins/markview'), + { + 'FabijanZulj/blame.nvim', + lazy = false, + config = function() + require('blame').setup({}) + end, + }, }) -- Load custom snippets after plugins are loaded diff --git a/lazy-lock.json b/lazy-lock.json index 0d5d07d..5360e24 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -1,44 +1,45 @@ { "FixCursorHold.nvim": { "branch": "master", "commit": "1900f89dc17c603eec29960f57c00bd9ae696495" }, - "LuaSnip": { "branch": "master", "commit": "642b0c595e11608b4c18219e93b88d7637af27bc" }, - "blink.cmp": { "branch": "main", "commit": "451168851e8e2466bc97ee3e026c3dcb9141ce07" }, + "LuaSnip": { "branch": "master", "commit": "a62e1083a3cfe8b6b206e7d3d33a51091df25357" }, + "blame.nvim": { "branch": "main", "commit": "179da7aaacce7c52874af636255ede72dd6fe796" }, + "blink.cmp": { "branch": "main", "commit": "78336bc89ee5365633bcf754d93df01678b5c08f" }, "ccc.nvim": { "branch": "main", "commit": "9d1a256e006decc574789dfc7d628ca11644d4c2" }, "conform.nvim": { "branch": "master", "commit": "086a40dc7ed8242c03be9f47fbcee68699cc2395" }, "cspell.nvim": { "branch": "main", "commit": "5feecef8d109f5460c576596aba44a6253127aa4" }, - "fidget.nvim": { "branch": "main", "commit": "7fa433a83118a70fe24c1ce88d5f0bd3453c0970" }, + "fidget.nvim": { "branch": "main", "commit": "889e2e96edef4e144965571d46f7a77bcc4d0ddf" }, "friendly-snippets": { "branch": "main", "commit": "6cd7280adead7f586db6fccbd15d2cac7e2188b9" }, - "gitsigns.nvim": { "branch": "main", "commit": "5c569562d9f9c98f12d684de5f37150e0ca1b12d" }, - "grug-far.nvim": { "branch": "main", "commit": "dc4684e163971bb1f5bfb93fbd4bb3e892bf9b15" }, + "gitsigns.nvim": { "branch": "main", "commit": "8d82c240f190fc33723d48c308ccc1ed8baad69d" }, + "grug-far.nvim": { "branch": "main", "commit": "b08a9f8d0602fdf075262e8e1b6dc776b3966003" }, "heirline.nvim": { "branch": "master", "commit": "fae936abb5e0345b85c3a03ecf38525b0828b992" }, "lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" }, "leetcode.nvim": { "branch": "master", "commit": "fdd3f91800b3983e27bc9fcfb99cfa7293d7f11a" }, "markview.nvim": { "branch": "main", "commit": "1861f959599ae03cfd59f56222a542035b0cd947" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "a979821a975897b88493843301950c456a725982" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "0a3b42c3e503df87aef6d6513e13148381495c3a" }, "mason-tool-installer.nvim": { "branch": "main", "commit": "443f1ef8b5e6bf47045cb2217b6f748a223cf7dc" }, - "mason.nvim": { "branch": "main", "commit": "44d1e90e1f66e077268191e3ee9d2ac97cc18e65" }, - "mini.pairs": { "branch": "main", "commit": "b7fde3719340946feb75017ef9d75edebdeb0566" }, + "mason.nvim": { "branch": "main", "commit": "b03fb0f20bc1d43daf558cda981a2be22e73ac42" }, + "mini.pairs": { "branch": "main", "commit": "42387c7fe68fc0b6e95eaf37f1bb76e7bffaa0d9" }, "mkdir.nvim": { "branch": "main", "commit": "c55d1dee4f099528a1853b28bb28caa802eba217" }, - "neo-tree.nvim": { "branch": "main", "commit": "1f75801ad71b440d1303c927fc489bc706eeee51" }, - "neotest": { "branch": "master", "commit": "b059824dc3c9422ccf6cfdbd7349df9f65389d39" }, + "neo-tree.nvim": { "branch": "main", "commit": "b48ed11632c8208ffb27dab6acfbf16e4f9e3376" }, + "neotest": { "branch": "master", "commit": "fd0b7986dd0ae04e38ec7dc0c78a432e3820839c" }, "neotest-bun": { "branch": "main", "commit": "af0f8684cd00a96f1e0359f1aeff2b9bf7a0ec88" }, - "neotest-jest": { "branch": "main", "commit": "3f0cc2cff1ee05394081805c622dc2551b54d8c4" }, - "none-ls.nvim": { "branch": "main", "commit": "c9317c2a8629d4e39e7cf47be74cb67f3ab37cda" }, + "neotest-jest": { "branch": "main", "commit": "0e7979d51301dfae5ef839d771bd28cf593fde3f" }, + "none-ls.nvim": { "branch": "main", "commit": "7f9301e416533b5d74e2fb3b1ce5059eeaed748b" }, "nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" }, - "nvim-lspconfig": { "branch": "master", "commit": "841c6d4139aedb8a3f2baf30cef5327371385b93" }, + "nvim-lspconfig": { "branch": "master", "commit": "cb5bc0b2b35a6d513e3298d285db81453e791f4f" }, "nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" }, - "nvim-treesitter": { "branch": "master", "commit": "cf12346a3414fa1b06af75c79faebe7f76df080a" }, + "nvim-treesitter": { "branch": "main", "commit": "4916d6592ede8c07973490d9322f187e07dfefac" }, "nvim-ts-autotag": { "branch": "main", "commit": "8e1c0a389f20bf7f5b0dd0e00306c1247bda2595" }, - "nvim-web-devicons": { "branch": "master", "commit": "d7462543c9e366c0d196c7f67a945eaaf5d99414" }, + "nvim-web-devicons": { "branch": "master", "commit": "c72328a5494b4502947a022fe69c0c47e53b6aa6" }, "nvim-window-picker": { "branch": "main", "commit": "6382540b2ae5de6c793d4aa2e3fe6dbb518505ec" }, - "plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" }, - "roslyn.nvim": { "branch": "main", "commit": "ff43201090361b8936e008a006473b59ef2c0ca6" }, - "schemastore.nvim": { "branch": "main", "commit": "66e53f3316515ac8548b47826f8d273955aa7af1" }, + "plenary.nvim": { "branch": "master", "commit": "74b06c6c75e4eeb3108ec01852001636d85a932b" }, + "roslyn.nvim": { "branch": "main", "commit": "f2ec6ee6384c3b611ddc817b9e78b20cd0334bbb" }, + "schemastore.nvim": { "branch": "main", "commit": "f5df9e70403b5d4c0642702a64534f04f3d71d03" }, "snacks.nvim": { "branch": "main", "commit": "ad9ede6a9cddf16cedbd31b8932d6dcdee9b716e" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "6fea601bd2b694c6f2ae08a6c6fab14930c60e2c" }, "telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" }, - "telescope.nvim": { "branch": "master", "commit": "5255aa27c422de944791318024167ad5d40aad20" }, + "telescope.nvim": { "branch": "master", "commit": "f7c673b8e46e8f233ff581d3624a517d33a7e264" }, "template-string.nvim": { "branch": "main", "commit": "d3a26d3c449a97c44891a31736a101b60b64cf2b" }, "todo-comments.nvim": { "branch": "main", "commit": "31e3c38ce9b29781e4422fc0322eb0a21f4e8668" }, - "tokyonight.nvim": { "branch": "main", "commit": "73822773d5badaeba999206179a9105f9867ac59" }, + "tokyonight.nvim": { "branch": "main", "commit": "cdc07ac78467a233fd62c493de29a17e0cf2b2b6" }, "ts-comments.nvim": { "branch": "main", "commit": "123a9fb12e7229342f807ec9e6de478b1102b041" } } diff --git a/lua/plugins/conform.lua b/lua/plugins/conform.lua index 56b7a74..fbf7302 100644 --- a/lua/plugins/conform.lua +++ b/lua/plugins/conform.lua @@ -20,12 +20,12 @@ return { -- Define your formatters formatters_by_ft = { lua = { 'stylua' }, - javascript = { 'prettierd', 'prettier', stop_after_first = true }, - javascriptreact = { 'prettierd', 'prettier', stop_after_first = true }, - typescript = { 'prettierd', 'prettier', stop_after_first = true }, - typescriptreact = { 'prettierd', 'prettier', stop_after_first = true }, - css = { 'prettierd', 'prettier', stop_after_first = true }, - scss = { 'prettierd', 'prettier', stop_after_first = true }, + javascript = { 'oxfmt' }, + javascriptreact = { 'oxfmt' }, + typescript = { 'oxfmt' }, + typescriptreact = { 'oxfmt' }, + scss = { 'oxfmt' }, + css = { 'oxfmt' }, json = { 'prettierd', 'prettier', stop_after_first = true }, jsonc = { 'prettierd', 'prettier', stop_after_first = true }, markdown = { 'prettierd', 'prettier', stop_after_first = true }, diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua index cd7dd24..7b4e607 100644 --- a/lua/plugins/telescope.lua +++ b/lua/plugins/telescope.lua @@ -49,7 +49,7 @@ return { -- Fuzzy Finder (files, lsp, etc) local builtin = require('telescope.builtin') vim.keymap.set('n', 'fh', builtin.help_tags) vim.keymap.set('n', 'fk', builtin.keymaps) - vim.keymap.set('n', 'ff', builtin.find_files) + -- vim.keymap.set('n', 'ff', builtin.find_files) vim.keymap.set('n', 'fs', builtin.builtin) vim.keymap.set('n', 'fw', builtin.grep_string) vim.keymap.set('n', 'fg', builtin.live_grep) @@ -58,5 +58,36 @@ return { -- Fuzzy Finder (files, lsp, etc) vim.keymap.set('n', 'f.', builtin.oldfiles) vim.keymap.set('n', 'fb', builtin.buffers) vim.keymap.set('n', 'ft', 'TodoTelescope') + + -- keybind to grep after find + local actions = require('telescope.actions') + local action_state = require('telescope.actions.state') + local builtin = require('telescope.builtin') + + vim.keymap.set('n', 'ff', function() + builtin.find_files({ + attach_mappings = function(_, map) + map('i', '', function(prompt_bufnr) + local picker = action_state.get_current_picker(prompt_bufnr) + local dirs = {} + + -- collect all selected/filtered results + for _, entry in ipairs(picker:get_multi_selection()) do + table.insert(dirs, entry.path) + end + + -- fallback to current entry if nothing multi-selected + if #dirs == 0 then + local entry = action_state.get_selected_entry() + table.insert(dirs, vim.fn.fnamemodify(entry.path, ':h')) + end + + actions.close(prompt_bufnr) + builtin.live_grep({ search_dirs = dirs }) + end) + return true + end, + }) + end) end, } diff --git a/lua/plugins/treesitter.lua b/lua/plugins/treesitter.lua index 851154f..87ad4aa 100644 --- a/lua/plugins/treesitter.lua +++ b/lua/plugins/treesitter.lua @@ -1,57 +1,56 @@ return { 'nvim-treesitter/nvim-treesitter', build = ':TSUpdate', + branch = 'main', config = function() - local configs = require('nvim-treesitter.configs') - - configs.setup({ - ensure_installed = { - 'bash', - 'c_sharp', - 'caddy', - 'css', - 'csv', - 'desktop', - 'diff', - 'dockerfile', - 'editorconfig', - 'gdscript', - 'gdshader', - 'git_config', - 'gitattributes', - 'gitcommit', - 'gitignore', - 'html', - 'ini', - 'javascript', - 'jsdoc', - 'json', - 'json5', - 'jsonc', - 'lua', - 'luadoc', - 'luap', - 'markdown', - 'php', - 'printf', - 'prisma', - 'properties', - 'python', - 'robots', - 'scss', - 'sql', - 'ssh_config', - 'toml', - 'tsx', - 'typescript', - 'xml', - 'yaml', - 'zig', - 'qmljs', - }, - sync_install = false, - highlight = { enable = true }, - indent = { enable = true }, - }) + require('nvim-treesitter').setup() end, + opts = { + ensure_installed = { + 'bash', + 'c_sharp', + 'caddy', + 'css', + 'csv', + 'desktop', + 'diff', + 'dockerfile', + 'editorconfig', + 'gdscript', + 'gdshader', + 'git_config', + 'gitattributes', + 'gitcommit', + 'gitignore', + 'html', + 'ini', + 'javascript', + 'jsdoc', + 'json', + 'json5', + 'jsonc', + 'lua', + 'luadoc', + 'luap', + 'markdown', + 'php', + 'printf', + 'prisma', + 'properties', + 'python', + 'robots', + 'scss', + 'sql', + 'ssh_config', + 'toml', + 'tsx', + 'typescript', + 'xml', + 'yaml', + 'zig', + }, + sync_install = false, + highlight = { enable = true }, + indent = { enable = true }, + }, }