From 97fba5998db163ec1efcd07671c3b98645e6dde9 Mon Sep 17 00:00:00 2001 From: Matt Turner Date: Sun, 10 Aug 2025 15:22:52 -0400 Subject: nvim: Rename lazy-plugins -> plugins --- nvim/.config/nvim/init.lua | 2 +- nvim/.config/nvim/lua/lazy-plugins.lua | 66 ----------- nvim/.config/nvim/lua/lazy-plugins/ccls.lua | 24 ---- nvim/.config/nvim/lua/lazy-plugins/completion.lua | 65 ---------- nvim/.config/nvim/lua/lazy-plugins/git.lua | 6 - nvim/.config/nvim/lua/lazy-plugins/mason-lsp.lua | 65 ---------- nvim/.config/nvim/lua/lazy-plugins/telescope.lua | 137 ---------------------- nvim/.config/nvim/lua/lazy-plugins/treesitter.lua | 47 -------- nvim/.config/nvim/lua/plugins.lua | 66 +++++++++++ nvim/.config/nvim/lua/plugins/ccls.lua | 24 ++++ nvim/.config/nvim/lua/plugins/completion.lua | 65 ++++++++++ nvim/.config/nvim/lua/plugins/git.lua | 6 + nvim/.config/nvim/lua/plugins/mason-lsp.lua | 65 ++++++++++ nvim/.config/nvim/lua/plugins/telescope.lua | 137 ++++++++++++++++++++++ nvim/.config/nvim/lua/plugins/treesitter.lua | 47 ++++++++ 15 files changed, 411 insertions(+), 411 deletions(-) delete mode 100644 nvim/.config/nvim/lua/lazy-plugins.lua delete mode 100644 nvim/.config/nvim/lua/lazy-plugins/ccls.lua delete mode 100644 nvim/.config/nvim/lua/lazy-plugins/completion.lua delete mode 100644 nvim/.config/nvim/lua/lazy-plugins/git.lua delete mode 100644 nvim/.config/nvim/lua/lazy-plugins/mason-lsp.lua delete mode 100644 nvim/.config/nvim/lua/lazy-plugins/telescope.lua delete mode 100644 nvim/.config/nvim/lua/lazy-plugins/treesitter.lua create mode 100644 nvim/.config/nvim/lua/plugins.lua create mode 100644 nvim/.config/nvim/lua/plugins/ccls.lua create mode 100644 nvim/.config/nvim/lua/plugins/completion.lua create mode 100644 nvim/.config/nvim/lua/plugins/git.lua create mode 100644 nvim/.config/nvim/lua/plugins/mason-lsp.lua create mode 100644 nvim/.config/nvim/lua/plugins/telescope.lua create mode 100644 nvim/.config/nvim/lua/plugins/treesitter.lua (limited to 'nvim') diff --git a/nvim/.config/nvim/init.lua b/nvim/.config/nvim/init.lua index da14476..8181403 100644 --- a/nvim/.config/nvim/init.lua +++ b/nvim/.config/nvim/init.lua @@ -13,7 +13,7 @@ vim.opt.rtp:prepend(vim.env.LAZY or lazypath) require("lazy").setup({ spec = { - { import = "lazy-plugins" }, + { import = "plugins" }, }, defaults = { -- By default, only LazyVim plugins will be lazy-loaded. Your custom plugins will load during startup. diff --git a/nvim/.config/nvim/lua/lazy-plugins.lua b/nvim/.config/nvim/lua/lazy-plugins.lua deleted file mode 100644 index 632b246..0000000 --- a/nvim/.config/nvim/lua/lazy-plugins.lua +++ /dev/null @@ -1,66 +0,0 @@ -vim.g.table_mode_corner = "|" - --- Put simply configured plugins here. -return { - { "fladson/vim-kitty", ft = "kitty" }, - { "lukas-reineke/indent-blankline.nvim", version = "v3.6.3", main = "ibl", opts = {} }, - { - "Mofiqul/adwaita.nvim", - lazy = false, - priority = 1000, - config = function() - vim.g.adwaita_darker = true - vim.cmd("colorscheme adwaita") - end - }, - { "norcalli/nvim-terminal.lua", opts = {} }, - "dhruvasagar/vim-table-mode", - { - "ibhagwan/fzf-lua", - dependencies = { "nvim-tree/nvim-web-devicons" }, - }, - { - "kylechui/nvim-surround", - event = "VeryLazy", - config = function() - require("nvim-surround").setup({ - -- Configuration here, or leave empty to use defaults - }) - end - }, - "tpope/vim-eunuch", - "vim-scripts/git_patch_tags.vim", - { - "nvim-lualine/lualine.nvim", - dependencies = { - "nvim-tree/nvim-web-devicons" - }, - }, - { - 'numToStr/Comment.nvim', - opts = { - -- add any options here - }, - lazy = false, - }, - { - "windwp/nvim-autopairs", - event = "InsertEnter", - config = true - }, - { - "rktjmp/paperplanes.nvim", - opts = { - register = "+", - provider = "sprunge.us", - provider_options = { insecure = true, }, - notifier = vim.notify or print, - }, - }, - { - "j-hui/fidget.nvim", - tag = "legacy", - event = "LspAttach", - opts = {}, - }, -} diff --git a/nvim/.config/nvim/lua/lazy-plugins/ccls.lua b/nvim/.config/nvim/lua/lazy-plugins/ccls.lua deleted file mode 100644 index 1ae961c..0000000 --- a/nvim/.config/nvim/lua/lazy-plugins/ccls.lua +++ /dev/null @@ -1,24 +0,0 @@ -local M = { - "ranjithshegde/ccls.nvim", - dependencies = { "neovim/nvim-lspconfig" }, -} - -M.config = function() - local ccls = require("ccls") - ccls.setup({ - lsp = { - -- check :help vim.lsp.start for config options - server = { - name = "ccls", --String name - cmd = {"/usr/bin/ccls"}, -- point to your binary, has to be a table - args = {--[[Any args table]] }, - offset_encoding = "utf-32", -- default value set by plugin - root_dir = vim.fs.dirname(vim.fs.find({ "compile_commands.json", ".git" }, { upward = true })[1]), -- or some other function that returns a string - --on_attach = your_func, - --capabilites = your_table/func - }, - }, - }) -end - -return M diff --git a/nvim/.config/nvim/lua/lazy-plugins/completion.lua b/nvim/.config/nvim/lua/lazy-plugins/completion.lua deleted file mode 100644 index 01fc0d8..0000000 --- a/nvim/.config/nvim/lua/lazy-plugins/completion.lua +++ /dev/null @@ -1,65 +0,0 @@ -local M = { - "hrsh7th/nvim-cmp", - dependencies = { - "hrsh7th/cmp-nvim-lsp", - "hrsh7th/cmp-nvim-lua", - "hrsh7th/cmp-buffer", - "hrsh7th/cmp-path", - "hrsh7th/cmp-cmdline", - "saadparwaiz1/cmp_luasnip", - { - "L3MON4D3/LuaSnip", - tag = "v2.1.1", - }, - }, -} - -M.config = function() - local cmp = require("cmp") - vim.opt.completeopt = { "menu", "menuone", "noselect" } - - cmp.setup({ - snippet = { - expand = function(args) - require("luasnip").lsp_expand(args.body) -- For `luasnip` users. - end, - }, - window = { - -- completion = cmp.config.window.bordered(), - -- documentation = cmp.config.window.bordered(), - }, - mapping = cmp.mapping.preset.insert({ - [""] = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Insert }), - [""] = cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Insert }), - [""] = cmp.mapping.scroll_docs(-4), - [""] = cmp.mapping.scroll_docs(4), - [""] = cmp.mapping.complete(), - [""] = cmp.mapping.abort(), - [""] = cmp.mapping.confirm({}), - [""] = cmp.mapping.confirm({ - behavior = cmp.ConfirmBehavior.Replace, - select = true, - }), - }), - sources = cmp.config.sources({ - { name = "nvim_lsp" }, - { name = "nvim_lua" }, - { name = "luasnip" }, -- For luasnip users. - -- { name = "orgmode" }, - }, { - { name = "buffer" }, - { name = "path" }, - }), - }) - - cmp.setup.cmdline(":", { - mapping = cmp.mapping.preset.cmdline(), - sources = cmp.config.sources({ - { name = "path" }, - }, { - { name = "cmdline" }, - }), - }) -end - -return M diff --git a/nvim/.config/nvim/lua/lazy-plugins/git.lua b/nvim/.config/nvim/lua/lazy-plugins/git.lua deleted file mode 100644 index dfd6e63..0000000 --- a/nvim/.config/nvim/lua/lazy-plugins/git.lua +++ /dev/null @@ -1,6 +0,0 @@ -return { - { - "tpope/vim-fugitive", - cmd = "Git", - } -} diff --git a/nvim/.config/nvim/lua/lazy-plugins/mason-lsp.lua b/nvim/.config/nvim/lua/lazy-plugins/mason-lsp.lua deleted file mode 100644 index 75537c0..0000000 --- a/nvim/.config/nvim/lua/lazy-plugins/mason-lsp.lua +++ /dev/null @@ -1,65 +0,0 @@ -return { - { - "neovim/nvim-lspconfig", - name = "lspconfig", - lazy = false, - dependencies = { - { "williamboman/mason-lspconfig.nvim", name = "mason-lspconfig" }, - { "williamboman/mason.nvim", name = "mason" }, - }, - config = function() - local lspconfig = require("lspconfig") - local mason = require("mason") - local mason_lspconfig = require("mason-lspconfig") - local capabilities = require('cmp_nvim_lsp').default_capabilities(vim.lsp.protocol.make_client_capabilities()) - local servers = { "lua_ls", "marksman", "pylsp" } --- local options = { noremap = true, silent = true } - - mason.setup({}) - - mason_lspconfig.setup({ ensure_installed = servers }) - - mason_lspconfig.setup_handlers({ - function(server_name) - lspconfig[server_name].setup({ - capabilities = capabilities, - }) - end, - ["lua_ls"] = function() - lspconfig.lua_ls.setup { - settings = { - Lua = { - runtime = { version = 'LuaJIT', }, - diagnostics = { - globals = { - 'vim', - 'require', - }, - }, - workspace = { - library = vim.api.nvim_get_runtime_file("", true), - checkThirdParty = false, - }, - telemetry = { enable = false }, - }, - }, - } - end, - ["pylsp"] = function() - lspconfig.pylsp.setup { - settings = { - pylsp = { - plugins = { - pycodestyle = { - ignore = {'W391'}, - maxLineLength = 100, - } - }, - }, - }, - } - end - }) - end - }, -} diff --git a/nvim/.config/nvim/lua/lazy-plugins/telescope.lua b/nvim/.config/nvim/lua/lazy-plugins/telescope.lua deleted file mode 100644 index cf3f151..0000000 --- a/nvim/.config/nvim/lua/lazy-plugins/telescope.lua +++ /dev/null @@ -1,137 +0,0 @@ -return { - { - "nvim-telescope/telescope.nvim", - lazy = true, - dependencies = { - { 'nvim-telescope/telescope-fzf-native.nvim', build = 'cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build' }, - "nvim-tree/nvim-web-devicons", - "nvim-lua/plenary.nvim", - "nvim-telescope/telescope-symbols.nvim", - }, - cmd = "Telescope", - keys = { - { "gr", function() require('telescope.builtin').lsp_references() end }, - { "fr", function() require('telescope.builtin').lsp_references() end }, - { "ff", "Telescope find_files" }, - { "fo", "Telescope oldfiles" }, - { "fg", "Telescope live_grep" }, - { "fb", "Telescope buffers" }, - { "fh", "Telescope help_tags" }, - { "fs", "Telescope grep_string" }, - }, - config = function() - local always_ignore_these = { - "yarn.lock", -- nodejs - "package%-lock.json", -- nodejs - "node_modules/.*", -- nodejs - "vendor/*", -- golang - "%.git/.*", - "%.png", - "%.jpeg", - "%.jpg", - "%.ico", - "%.webp", - "%.avif", - "%.heic", - "%.mp3", - "%.mp4", - "%.mkv", - "%.mov", - "%.wav", - "%.flv", - "%.avi", - "%.webm", - "%.db", - } - - require("telescope").setup({ - defaults = { - mappings = { - i = { - -- don't go into normal mode, just close - [""] = require("telescope.actions").close, - -- scroll the list with and - [""] = require("telescope.actions").move_selection_next, - [""] = require("telescope.actions").move_selection_previous, - -- move the preview window up and down - [""] = require("telescope.actions").preview_scrolling_up, - [""] = require("telescope.actions").preview_scrolling_down, - }, - }, - vimgrep_arguments = { - "rg", - "--color=never", - "--no-heading", - "--with-filename", - "--line-number", - "--column", - "--smart-case", - "--trim", - }, - layout_strategy = "flex", - layout_config = { - prompt_position = "top", - horizontal = { - mirror = true, - preview_cutoff = 100, - preview_width = 0.5, - }, - vertical = { - mirror = true, - preview_cutoff = 0.4, - }, - flex = { - flip_columns = 110, - }, - height = 0.94, - width = 0.86, - }, - prompt_prefix = "  ", - selection_caret = " ", - entry_prefix = " ", - initial_mode = "insert", - selection_strategy = "reset", - sorting_strategy = "ascending", - file_sorter = require("telescope.sorters").get_fuzzy_file, - file_ignore_patterns = always_ignore_these, - generic_sorter = require("telescope.sorters").get_generic_fuzzy_sorter, - path_display = { "truncate" }, - winblend = 0, - border = {}, - borderchars = { - "─", - "│", - "─", - "│", - "╭", - "╮", - "╯", - "╰", - }, - color_devicons = true, - use_less = true, - set_env = { ["COLORTERM"] = "truecolor" }, -- default = nil, - file_previewer = require("telescope.previewers").vim_buffer_cat.new, - grep_previewer = require("telescope.previewers").vim_buffer_vimgrep.new, - qflist_previewer = require("telescope.previewers").vim_buffer_qflist.new, - -- Developer configurations: Not meant for general override - buffer_previewer_maker = require("telescope.previewers").buffer_previewer_maker, - }, - pickers = { - find_files = { - find_command = { "fd", "--type", "f", "--strip-cwd-prefix" }, - hidden = true, - }, - }, - extensions = { - fzf = { - fuzzy = true, - override_generic_sorter = true, - override_file_sorter = true, - case_mode = "smart_case", - }, - }, - }) - end - }, -} diff --git a/nvim/.config/nvim/lua/lazy-plugins/treesitter.lua b/nvim/.config/nvim/lua/lazy-plugins/treesitter.lua deleted file mode 100644 index c1b9cf2..0000000 --- a/nvim/.config/nvim/lua/lazy-plugins/treesitter.lua +++ /dev/null @@ -1,47 +0,0 @@ -return { - { - "nvim-treesitter/nvim-treesitter", - build = function() - pcall(require("nvim-treesitter.install").update({ with_sync = true })) - end, - event = "BufReadPost", - dependencies = { - "nvim-treesitter/nvim-treesitter-textobjects", - }, - opts = { - highlight = { enable = true }, - indent = { enable = true }, - context_commentstring = { enable = true, enable_autocmd = false }, - ensure_installed = { - "bash", - "c", - "cmake", - "cpp", - "dockerfile", - "git_config", - "gitattributes", - "gitcommit", - "gitignore", - "go", - "ini", - "javascript", - "jsdoc", - "json", - "json5", - "lua", - "make", - "markdown", - "meson", - "ninja", - "python", - "rust", - "toml", - "vim", - "yaml", - }, - }, - config = function(plugin, opts) - require("nvim-treesitter.configs").setup(opts) - end, - }, -} diff --git a/nvim/.config/nvim/lua/plugins.lua b/nvim/.config/nvim/lua/plugins.lua new file mode 100644 index 0000000..632b246 --- /dev/null +++ b/nvim/.config/nvim/lua/plugins.lua @@ -0,0 +1,66 @@ +vim.g.table_mode_corner = "|" + +-- Put simply configured plugins here. +return { + { "fladson/vim-kitty", ft = "kitty" }, + { "lukas-reineke/indent-blankline.nvim", version = "v3.6.3", main = "ibl", opts = {} }, + { + "Mofiqul/adwaita.nvim", + lazy = false, + priority = 1000, + config = function() + vim.g.adwaita_darker = true + vim.cmd("colorscheme adwaita") + end + }, + { "norcalli/nvim-terminal.lua", opts = {} }, + "dhruvasagar/vim-table-mode", + { + "ibhagwan/fzf-lua", + dependencies = { "nvim-tree/nvim-web-devicons" }, + }, + { + "kylechui/nvim-surround", + event = "VeryLazy", + config = function() + require("nvim-surround").setup({ + -- Configuration here, or leave empty to use defaults + }) + end + }, + "tpope/vim-eunuch", + "vim-scripts/git_patch_tags.vim", + { + "nvim-lualine/lualine.nvim", + dependencies = { + "nvim-tree/nvim-web-devicons" + }, + }, + { + 'numToStr/Comment.nvim', + opts = { + -- add any options here + }, + lazy = false, + }, + { + "windwp/nvim-autopairs", + event = "InsertEnter", + config = true + }, + { + "rktjmp/paperplanes.nvim", + opts = { + register = "+", + provider = "sprunge.us", + provider_options = { insecure = true, }, + notifier = vim.notify or print, + }, + }, + { + "j-hui/fidget.nvim", + tag = "legacy", + event = "LspAttach", + opts = {}, + }, +} diff --git a/nvim/.config/nvim/lua/plugins/ccls.lua b/nvim/.config/nvim/lua/plugins/ccls.lua new file mode 100644 index 0000000..1ae961c --- /dev/null +++ b/nvim/.config/nvim/lua/plugins/ccls.lua @@ -0,0 +1,24 @@ +local M = { + "ranjithshegde/ccls.nvim", + dependencies = { "neovim/nvim-lspconfig" }, +} + +M.config = function() + local ccls = require("ccls") + ccls.setup({ + lsp = { + -- check :help vim.lsp.start for config options + server = { + name = "ccls", --String name + cmd = {"/usr/bin/ccls"}, -- point to your binary, has to be a table + args = {--[[Any args table]] }, + offset_encoding = "utf-32", -- default value set by plugin + root_dir = vim.fs.dirname(vim.fs.find({ "compile_commands.json", ".git" }, { upward = true })[1]), -- or some other function that returns a string + --on_attach = your_func, + --capabilites = your_table/func + }, + }, + }) +end + +return M diff --git a/nvim/.config/nvim/lua/plugins/completion.lua b/nvim/.config/nvim/lua/plugins/completion.lua new file mode 100644 index 0000000..01fc0d8 --- /dev/null +++ b/nvim/.config/nvim/lua/plugins/completion.lua @@ -0,0 +1,65 @@ +local M = { + "hrsh7th/nvim-cmp", + dependencies = { + "hrsh7th/cmp-nvim-lsp", + "hrsh7th/cmp-nvim-lua", + "hrsh7th/cmp-buffer", + "hrsh7th/cmp-path", + "hrsh7th/cmp-cmdline", + "saadparwaiz1/cmp_luasnip", + { + "L3MON4D3/LuaSnip", + tag = "v2.1.1", + }, + }, +} + +M.config = function() + local cmp = require("cmp") + vim.opt.completeopt = { "menu", "menuone", "noselect" } + + cmp.setup({ + snippet = { + expand = function(args) + require("luasnip").lsp_expand(args.body) -- For `luasnip` users. + end, + }, + window = { + -- completion = cmp.config.window.bordered(), + -- documentation = cmp.config.window.bordered(), + }, + mapping = cmp.mapping.preset.insert({ + [""] = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Insert }), + [""] = cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Insert }), + [""] = cmp.mapping.scroll_docs(-4), + [""] = cmp.mapping.scroll_docs(4), + [""] = cmp.mapping.complete(), + [""] = cmp.mapping.abort(), + [""] = cmp.mapping.confirm({}), + [""] = cmp.mapping.confirm({ + behavior = cmp.ConfirmBehavior.Replace, + select = true, + }), + }), + sources = cmp.config.sources({ + { name = "nvim_lsp" }, + { name = "nvim_lua" }, + { name = "luasnip" }, -- For luasnip users. + -- { name = "orgmode" }, + }, { + { name = "buffer" }, + { name = "path" }, + }), + }) + + cmp.setup.cmdline(":", { + mapping = cmp.mapping.preset.cmdline(), + sources = cmp.config.sources({ + { name = "path" }, + }, { + { name = "cmdline" }, + }), + }) +end + +return M diff --git a/nvim/.config/nvim/lua/plugins/git.lua b/nvim/.config/nvim/lua/plugins/git.lua new file mode 100644 index 0000000..dfd6e63 --- /dev/null +++ b/nvim/.config/nvim/lua/plugins/git.lua @@ -0,0 +1,6 @@ +return { + { + "tpope/vim-fugitive", + cmd = "Git", + } +} diff --git a/nvim/.config/nvim/lua/plugins/mason-lsp.lua b/nvim/.config/nvim/lua/plugins/mason-lsp.lua new file mode 100644 index 0000000..75537c0 --- /dev/null +++ b/nvim/.config/nvim/lua/plugins/mason-lsp.lua @@ -0,0 +1,65 @@ +return { + { + "neovim/nvim-lspconfig", + name = "lspconfig", + lazy = false, + dependencies = { + { "williamboman/mason-lspconfig.nvim", name = "mason-lspconfig" }, + { "williamboman/mason.nvim", name = "mason" }, + }, + config = function() + local lspconfig = require("lspconfig") + local mason = require("mason") + local mason_lspconfig = require("mason-lspconfig") + local capabilities = require('cmp_nvim_lsp').default_capabilities(vim.lsp.protocol.make_client_capabilities()) + local servers = { "lua_ls", "marksman", "pylsp" } +-- local options = { noremap = true, silent = true } + + mason.setup({}) + + mason_lspconfig.setup({ ensure_installed = servers }) + + mason_lspconfig.setup_handlers({ + function(server_name) + lspconfig[server_name].setup({ + capabilities = capabilities, + }) + end, + ["lua_ls"] = function() + lspconfig.lua_ls.setup { + settings = { + Lua = { + runtime = { version = 'LuaJIT', }, + diagnostics = { + globals = { + 'vim', + 'require', + }, + }, + workspace = { + library = vim.api.nvim_get_runtime_file("", true), + checkThirdParty = false, + }, + telemetry = { enable = false }, + }, + }, + } + end, + ["pylsp"] = function() + lspconfig.pylsp.setup { + settings = { + pylsp = { + plugins = { + pycodestyle = { + ignore = {'W391'}, + maxLineLength = 100, + } + }, + }, + }, + } + end + }) + end + }, +} diff --git a/nvim/.config/nvim/lua/plugins/telescope.lua b/nvim/.config/nvim/lua/plugins/telescope.lua new file mode 100644 index 0000000..cf3f151 --- /dev/null +++ b/nvim/.config/nvim/lua/plugins/telescope.lua @@ -0,0 +1,137 @@ +return { + { + "nvim-telescope/telescope.nvim", + lazy = true, + dependencies = { + { 'nvim-telescope/telescope-fzf-native.nvim', build = 'cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build' }, + "nvim-tree/nvim-web-devicons", + "nvim-lua/plenary.nvim", + "nvim-telescope/telescope-symbols.nvim", + }, + cmd = "Telescope", + keys = { + { "gr", function() require('telescope.builtin').lsp_references() end }, + { "fr", function() require('telescope.builtin').lsp_references() end }, + { "ff", "Telescope find_files" }, + { "fo", "Telescope oldfiles" }, + { "fg", "Telescope live_grep" }, + { "fb", "Telescope buffers" }, + { "fh", "Telescope help_tags" }, + { "fs", "Telescope grep_string" }, + }, + config = function() + local always_ignore_these = { + "yarn.lock", -- nodejs + "package%-lock.json", -- nodejs + "node_modules/.*", -- nodejs + "vendor/*", -- golang + "%.git/.*", + "%.png", + "%.jpeg", + "%.jpg", + "%.ico", + "%.webp", + "%.avif", + "%.heic", + "%.mp3", + "%.mp4", + "%.mkv", + "%.mov", + "%.wav", + "%.flv", + "%.avi", + "%.webm", + "%.db", + } + + require("telescope").setup({ + defaults = { + mappings = { + i = { + -- don't go into normal mode, just close + [""] = require("telescope.actions").close, + -- scroll the list with and + [""] = require("telescope.actions").move_selection_next, + [""] = require("telescope.actions").move_selection_previous, + -- move the preview window up and down + [""] = require("telescope.actions").preview_scrolling_up, + [""] = require("telescope.actions").preview_scrolling_down, + }, + }, + vimgrep_arguments = { + "rg", + "--color=never", + "--no-heading", + "--with-filename", + "--line-number", + "--column", + "--smart-case", + "--trim", + }, + layout_strategy = "flex", + layout_config = { + prompt_position = "top", + horizontal = { + mirror = true, + preview_cutoff = 100, + preview_width = 0.5, + }, + vertical = { + mirror = true, + preview_cutoff = 0.4, + }, + flex = { + flip_columns = 110, + }, + height = 0.94, + width = 0.86, + }, + prompt_prefix = "  ", + selection_caret = " ", + entry_prefix = " ", + initial_mode = "insert", + selection_strategy = "reset", + sorting_strategy = "ascending", + file_sorter = require("telescope.sorters").get_fuzzy_file, + file_ignore_patterns = always_ignore_these, + generic_sorter = require("telescope.sorters").get_generic_fuzzy_sorter, + path_display = { "truncate" }, + winblend = 0, + border = {}, + borderchars = { + "─", + "│", + "─", + "│", + "╭", + "╮", + "╯", + "╰", + }, + color_devicons = true, + use_less = true, + set_env = { ["COLORTERM"] = "truecolor" }, -- default = nil, + file_previewer = require("telescope.previewers").vim_buffer_cat.new, + grep_previewer = require("telescope.previewers").vim_buffer_vimgrep.new, + qflist_previewer = require("telescope.previewers").vim_buffer_qflist.new, + -- Developer configurations: Not meant for general override + buffer_previewer_maker = require("telescope.previewers").buffer_previewer_maker, + }, + pickers = { + find_files = { + find_command = { "fd", "--type", "f", "--strip-cwd-prefix" }, + hidden = true, + }, + }, + extensions = { + fzf = { + fuzzy = true, + override_generic_sorter = true, + override_file_sorter = true, + case_mode = "smart_case", + }, + }, + }) + end + }, +} diff --git a/nvim/.config/nvim/lua/plugins/treesitter.lua b/nvim/.config/nvim/lua/plugins/treesitter.lua new file mode 100644 index 0000000..c1b9cf2 --- /dev/null +++ b/nvim/.config/nvim/lua/plugins/treesitter.lua @@ -0,0 +1,47 @@ +return { + { + "nvim-treesitter/nvim-treesitter", + build = function() + pcall(require("nvim-treesitter.install").update({ with_sync = true })) + end, + event = "BufReadPost", + dependencies = { + "nvim-treesitter/nvim-treesitter-textobjects", + }, + opts = { + highlight = { enable = true }, + indent = { enable = true }, + context_commentstring = { enable = true, enable_autocmd = false }, + ensure_installed = { + "bash", + "c", + "cmake", + "cpp", + "dockerfile", + "git_config", + "gitattributes", + "gitcommit", + "gitignore", + "go", + "ini", + "javascript", + "jsdoc", + "json", + "json5", + "lua", + "make", + "markdown", + "meson", + "ninja", + "python", + "rust", + "toml", + "vim", + "yaml", + }, + }, + config = function(plugin, opts) + require("nvim-treesitter.configs").setup(opts) + end, + }, +} -- cgit v1.3