From 4b6f99b5a86c20a8f649aa59e23f3168c3dc5fba Mon Sep 17 00:00:00 2001 From: huyjaky Date: Sat, 16 Aug 2025 19:57:11 +0700 Subject: [PATCH] astro-nvim-v3 - uptostate --- init.lua | 19 ++++ lazy-lock.json | 5 +- lua/core/autocmds.lua | 38 ++++--- lua/core/mappings.lua | 4 - lua/lazy_setup.lua | 72 ++++++------- lua/plugins/astrocore.lua | 4 +- lua/plugins/astroui.lua | 1 - lua/plugins/cmp.lua | 2 + .../configs/lsp/config/jedi_language.lua | 53 +++++----- lua/plugins/disabled.lua | 100 +++++++++--------- lua/plugins/editor.lua | 72 +++++++------ lua/plugins/mason.lua | 4 +- lua/plugins/neo-tree.lua | 21 ++-- lua/plugins/noice.lua | 24 +++-- lua/plugins/none-ls.lua | 4 +- lua/plugins/treesitter.lua | 53 +++++----- 16 files changed, 248 insertions(+), 228 deletions(-) diff --git a/init.lua b/init.lua index dacba2b..767086e 100644 --- a/init.lua +++ b/init.lua @@ -27,3 +27,22 @@ vim.g.copilot_no_tab_map = true require("lazy_setup") require("polish") require("core.lsp") + + +-- local function silent_hover() +-- local params = vim.lsp.util.make_position_params() +-- vim.lsp.buf_request(0, 'textDocument/hover', params, function(err, result, ctx, config) +-- if err then +-- -- Silently ignore errors instead of showing them +-- return +-- end +-- if result and result.contents then +-- vim.lsp.util.stylize_markdown(result.contents.value or result.contents, {}) +-- end +-- end) +-- end + +-- -- Remap K to use silent hover +-- vim.keymap.set({'n', 'v'}, 'K', silent_hover, { silent = true }) + +-- Keep K for documentation in normal mode, but disable in visual mode diff --git a/lazy-lock.json b/lazy-lock.json index 718cc2a..f5b40da 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -4,7 +4,7 @@ "LuaSnip": { "branch": "master", "commit": "458560534a73f7f8d7a11a146c801db00b081df0" }, "aerial.nvim": { "branch": "master", "commit": "3284a2cb858ba009c79da87d5e010ccee3c99c4d" }, "alpha-nvim": { "branch": "main", "commit": "de72250e054e5e691b9736ee30db72c65d560771" }, - "astrocommunity": { "branch": "main", "commit": "8930cf06505230b710001f625052bcbc1bba04a5" }, + "astrocommunity": { "branch": "main", "commit": "383f86e1fca91adc013fd99dd4a4a01777471f3e" }, "astrocore": { "branch": "main", "commit": "44a3dc0bf1591022b2a6bc89dccdfac1be17bec9" }, "astrolsp": { "branch": "main", "commit": "909fbe64f3f87d089ff3777751261544557117cc" }, "astrotheme": { "branch": "main", "commit": "41b7d8430a55fd771e41bd763af4c3fd1c2fc0b5" }, @@ -32,6 +32,7 @@ "lsp_signature.nvim": { "branch": "master", "commit": "a38da0a61c172bb59e34befc12efe48359884793" }, "lspkind.nvim": { "branch": "master", "commit": "d79a1c3299ad0ef94e255d045bed9fa26025dab6" }, "markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" }, + "markview.nvim": { "branch": "main", "commit": "2d68c060ad4387d9895577af43c3ace41a80de5d" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "1a31f824b9cd5bc6f342fc29e9a53b60d74af245" }, "mason-null-ls.nvim": { "branch": "main", "commit": "2b8433f76598397fcc97318d410e0c4f7a4bea6a" }, "mason-nvim-dap.nvim": { "branch": "main", "commit": "4c2cdc69d69fe00c15ae8648f7e954d99e5de3ea" }, @@ -58,7 +59,7 @@ "nvim-notify": { "branch": "master", "commit": "a3020c2cf4dfc4c4f390c4a21e84e35e46cf5d17" }, "nvim-spider": { "branch": "main", "commit": "a81d07e07e279923b1a10d0146c543bf079f747e" }, "nvim-treesitter": { "branch": "master", "commit": "f8aaf5ce4e27cd20de917946b2ae5c968a2c2858" }, - "nvim-treesitter-context": { "branch": "master", "commit": "6853ecb2cd8b062365da1cdd1a2e6f934ad55ed6" }, + "nvim-treesitter-context": { "branch": "master", "commit": "dca8726fea2c14e1ce6adbaa76a04816fbfaff61" }, "nvim-treesitter-textobjects": { "branch": "master", "commit": "9937e5e356e5b227ec56d83d0a9d0a0f6bc9cad4" }, "nvim-ts-autotag": { "branch": "main", "commit": "1cca23c9da708047922d3895a71032bc0449c52d" }, "nvim-ts-context-commentstring": { "branch": "main", "commit": "1b212c2eee76d787bbea6aa5e92a2b534e7b4f8f" }, diff --git a/lua/core/autocmds.lua b/lua/core/autocmds.lua index 5f6cd8c..71d33b1 100644 --- a/lua/core/autocmds.lua +++ b/lua/core/autocmds.lua @@ -4,9 +4,7 @@ vim.api.nvim_create_augroup("auto_wrap", { clear = true }) vim.api.nvim_create_augroup("disable_suspend_with_c_z", { clear = true }) vim.api.nvim_create_augroup("clear_last_search", { clear = true }) -vim.g.vim_markdown_math = 1 -vim.g.vim_markdown_conceal = 2 -vim.g.vim_markdown_conceal_code_blocks = 0 +vim.keymap.set("v", "K", "", { silent = true }) -- NOTE: Set colors for hightlights for similar words -- vim.api.nvim_set_hl(0, "LspReferenceRead", { fg = "#FF0000" }) @@ -14,31 +12,31 @@ vim.g.vim_markdown_conceal_code_blocks = 0 -- vim.api.nvim_set_hl(0, "LspReferenceText", { fg = "#FF0000" }) vim.api.nvim_create_autocmd("BufEnter", { - desc = "Disable auto insert comment newline", - group = "disable_comment_newline", - command = "set formatoptions-=cro", + desc = "Disable auto insert comment newline", + group = "disable_comment_newline", + command = "set formatoptions-=cro", }) vim.api.nvim_create_autocmd("FileType", { - desc = "Enable wrap and spell for text like documents", - group = "auto_wrap", - pattern = { "gitcommit", "markdown", "text", "plaintext" }, - callback = function() - vim.opt_local.wrap = true - vim.opt_local.spell = true - end, + desc = "Enable wrap and spell for text like documents", + group = "auto_wrap", + pattern = { "gitcommit", "markdown", "text", "plaintext" }, + callback = function() + vim.opt_local.wrap = true + vim.opt_local.spell = true + end, }) vim.api.nvim_create_autocmd("BufEnter", { - desc = "Remap to nothing so that it doesn't suspend terminal", - group = "disable_suspend_with_c_z", - command = "nnoremap ", + desc = "Remap to nothing so that it doesn't suspend terminal", + group = "disable_suspend_with_c_z", + command = "nnoremap ", }) vim.api.nvim_create_autocmd("BufWinEnter", { - desc = "Clear last search pattern", - group = "clear_last_search", - pattern = "*", - command = "let @/ = ''", + desc = "Clear last search pattern", + group = "clear_last_search", + pattern = "*", + command = "let @/ = ''", }) diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index cde9700..0641b6c 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -61,10 +61,6 @@ return function() ------ My customs keybinding ------ mappings.n["xn"] = { "Telescope notify", desc = "Notifications" } - mappings.i["VK"] = false - mappings.v["VK"] = false - mappings.n["VK"] = false - return mappings end diff --git a/lua/lazy_setup.lua b/lua/lazy_setup.lua index 8af39c0..4feff14 100644 --- a/lua/lazy_setup.lua +++ b/lua/lazy_setup.lua @@ -1,43 +1,43 @@ require("lazy").setup({ - { - "AstroNvim/AstroNvim", - version = "^4", -- Remove version tracking to elect for nighly AstroNvim - import = "astronvim.plugins", - opts = { -- AstroNvim options must be set here with the `import` key - mapleader = " ", -- This ensures the leader key must be configured before Lazy is set up - maplocalleader = ",", -- This ensures the localleader key must be configured before Lazy is set up - icons_enabled = true, -- Set to false to disable icons (if no Nerd Font is available) - pin_plugins = nil, -- Default will pin plugins when tracking `version` of AstroNvim, set to true/false to override - }, - }, - { import = "community" }, - { import = "plugins" }, + { + "AstroNvim/AstroNvim", + version = "^4", -- Remove version tracking to elect for nighly AstroNvim + import = "astronvim.plugins", + opts = { -- AstroNvim options must be set here with the `import` key + mapleader = " ", -- This ensures the leader key must be configured before Lazy is set up + maplocalleader = ",", -- This ensures the localleader key must be configured before Lazy is set up + icons_enabled = true, -- Set to false to disable icons (if no Nerd Font is available) + pin_plugins = nil, -- Default will pin plugins when tracking `version` of AstroNvim, set to true/false to override + }, + }, + { import = "community" }, + { import = "plugins" }, } --[[@as LazySpec]], { - -- Configure any other `lazy.nvim` configuration options here - install = { colorscheme = { "astrodark", "habamax" } }, + -- Configure any other `lazy.nvim` configuration options here + install = { colorscheme = { "astrodark", "habamax" } }, - ui = { - backdrop = 100, - border = "single", - size = { width = 0.8, height = 0.8 }, - }, + ui = { + backdrop = 100, + border = "single", + size = { width = 0.8, height = 0.8 }, + }, - checker = { - enabled = true, - notify = false, - }, + checker = { + enabled = true, + notify = false, + }, - performance = { - rtp = { - -- disable some rtp plugins, add more to your liking - disabled_plugins = { - "gzip", - "netrwPlugin", - "tarPlugin", - "tohtml", - "zipPlugin", - }, - }, - }, + performance = { + rtp = { + -- disable some rtp plugins, add more to your liking + disabled_plugins = { + "gzip", + "netrwPlugin", + "tarPlugin", + "tohtml", + "zipPlugin", + }, + }, + }, } --[[@as LazyConfig]]) diff --git a/lua/plugins/astrocore.lua b/lua/plugins/astrocore.lua index 15c5f22..04e96cc 100644 --- a/lua/plugins/astrocore.lua +++ b/lua/plugins/astrocore.lua @@ -13,7 +13,7 @@ return { large_buf = { size = 1024 * 500, lines = 10000 }, -- set global limits for large files for disabling features like treesitter autopairs = false, -- enable autopairs at start cmp = true, -- enable completion at start - diagnostics_mode = 2, -- diagnostic mode on start (0 = off, 1 = no signs/virtual text, 2 = no virtual text, 3 = on) + diagnostics_mode = 1, -- diagnostic mode on start (0 = off, 1 = no signs/virtual text, 2 = no virtual text, 3 = on) highlighturl = false, -- highlight URLs at start notifications = true, -- enable notifications at start }, @@ -27,7 +27,7 @@ return { sessions = { -- Configure auto saving autosave = { - last = true, -- auto save last session + last = false, -- auto save last session cwd = false, -- auto save session for each working directory }, -- Patterns to ignore when saving sessions diff --git a/lua/plugins/astroui.lua b/lua/plugins/astroui.lua index 77954fa..49c4afa 100644 --- a/lua/plugins/astroui.lua +++ b/lua/plugins/astroui.lua @@ -16,6 +16,5 @@ return { icons = require "plugins.configs.ui.icons", status = require "plugins.configs.ui.status", lazygit = false, - }, } diff --git a/lua/plugins/cmp.lua b/lua/plugins/cmp.lua index 6e0ce4d..5196449 100644 --- a/lua/plugins/cmp.lua +++ b/lua/plugins/cmp.lua @@ -3,6 +3,8 @@ local function has_words_before() return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil end + + return { { "github/copilot.vim", diff --git a/lua/plugins/configs/lsp/config/jedi_language.lua b/lua/plugins/configs/lsp/config/jedi_language.lua index 486d203..9ad8f9d 100644 --- a/lua/plugins/configs/lsp/config/jedi_language.lua +++ b/lua/plugins/configs/lsp/config/jedi_language.lua @@ -1,30 +1,31 @@ return { - init_options = { - completion = { - disableSnippets = true, - }, - diagnostics = { - enable = false, - }, - hover = { - enable = true, - }, - workspace = { - environmentPath = "/home/duckq1u/miniconda3/envs/OCR3/bin/python", - ignore = { - "/home/duckq1u/miniconda3/envs/OCR3/lib/python3.11/site-packages/transformers/mode ls/albert/configuration_albert.py", - }, - }, + init_options = { + completion = { + disableSnippets = true, + }, + diagnostics = { + enable = false, + }, + hover = { + enable = true, + }, + workspace = { + -- environmentPath = "/home/duckq1u/miniconda3/envs/OCR3/bin/python", + environmentPath = vim.fn.exepath("python"), + ignore = { + "/home/duckq1u/miniconda3/envs/OCR3/lib/python3.11/site-packages/transformers/mode ls/albert/configuration_albert.py", + }, + }, - jediSettings = { - autoImportModules = { - "numpy", - "pandas", - "torch", - -- "torchmetrics", - -- "pytorch_lightning", - }, - }, - }, + jediSettings = { + autoImportModules = { + "numpy", + "pandas", + "torch", + -- "torchmetrics", + -- "pytorch_lightning", + }, + }, + }, } diff --git a/lua/plugins/disabled.lua b/lua/plugins/disabled.lua index 365fde4..f019100 100644 --- a/lua/plugins/disabled.lua +++ b/lua/plugins/disabled.lua @@ -1,61 +1,59 @@ -- Plugins to disable return { - { "s1n7ax/nvim-window-picker", enabled = false }, - { "akinsho/toggleterm.nvim", enabled = false }, - { "NvChad/nvim-colorizer.lua", enabled = false }, - { "catppuccin/nvim", name = "catppuccin", enabled = false }, - { "rebelot/kanagawa.nvim", enabled = false }, - { "folke/tokyonight.nvim", enabled = false }, - { "f4z3r/gruvbox-material.nvim", name = "gruvbox-material", enabled = false }, - { "b0o/SchemaStore.nvim", enabled = false }, - { "ray-x/lsp_signature.nvim", enabled = false }, - { "kmontocam/nvim-conda", enabled = false }, - { "NMAC427/guess-indent.nvim", enabled = false }, - { "lukas-reineke/indent-blankline.nvim", enabled = false }, - { "AstroNvim/astrotheme", enabled = false }, - { "scottmckendry/cyberdream.nvim", enabled = false }, - { "xiyaowong/transparent.nvim", enabled = false }, - { "loctvl842/monokai-pro.nvim", enabled = false }, - { "xiyaowong/transparent.nvim", enabled = false }, - { "iamcco/markdown-preview.nvim", enabled = false }, - { "max397574/better-escape.nvim", enabled = false }, - { "hinell/duplicate.nvim", enabled = false }, - { "CRAG666/code_runner.nvim", enabled = false }, - { "RRethy/vim-illuminate", enabled = false }, - -- { "OXY2DEV/markview.nvim", enabled = false }, - { "kevinhwang91/nvim-ufo", enabled = false }, - { "echasnovski/mini.bufremove", enabled = false }, + { "s1n7ax/nvim-window-picker", enabled = false }, + { "akinsho/toggleterm.nvim", enabled = false }, + { "NvChad/nvim-colorizer.lua", enabled = false }, + { "catppuccin/nvim", name = "catppuccin", enabled = false }, + { "rebelot/kanagawa.nvim", enabled = false }, + { "folke/tokyonight.nvim", enabled = false }, + { "f4z3r/gruvbox-material.nvim", name = "gruvbox-material", enabled = false }, + { "b0o/SchemaStore.nvim", enabled = false }, + { "ray-x/lsp_signature.nvim", enabled = false }, + { "kmontocam/nvim-conda", enabled = false }, + { "NMAC427/guess-indent.nvim", enabled = false }, + { "lukas-reineke/indent-blankline.nvim", enabled = false }, + { "AstroNvim/astrotheme", enabled = false }, + { "scottmckendry/cyberdream.nvim", enabled = false }, + { "xiyaowong/transparent.nvim", enabled = false }, + { "loctvl842/monokai-pro.nvim", enabled = false }, + { "xiyaowong/transparent.nvim", enabled = false }, + { "iamcco/markdown-preview.nvim", enabled = false }, + { "max397574/better-escape.nvim", enabled = false }, + { "hinell/duplicate.nvim", enabled = false }, + { "CRAG666/code_runner.nvim", enabled = false }, + { "RRethy/vim-illuminate", enabled = false }, + { "kevinhwang91/nvim-ufo", enabled = false }, + { "echasnovski/mini.bufremove", enabled = false }, - { "hrsh7th/nvim-cmp", enabled = false }, - { "rcarriga/cmp-dap", enabled = false }, + { "hrsh7th/nvim-cmp", enabled = false }, + { "rcarriga/cmp-dap", enabled = false }, - -- System - { "nvim-treesitter/nvim-treesitter-textobjects", enabled = false }, - -- Disable Dap - { "mfussenegger/nvim-dap", enabled = false }, - { "theHamsta/nvim-dap-virtual-text", enabled = false }, - { "rcarriga/nvim-dap-ui", enabled = false }, - { "jay-babu/mason-nvim-dap.nvim", enabled = false }, - -- { "jay-babu/mason-null-ls.nvim", enabled = false }, - { "b0o/schemastore.nvim", enabled = false }, - { "Wansmer/treesj", enabled = false }, + -- System + { "nvim-treesitter/nvim-treesitter-textobjects", enabled = false }, + -- Disable Dap + { "mfussenegger/nvim-dap", enabled = false }, + { "theHamsta/nvim-dap-virtual-text", enabled = false }, + { "rcarriga/nvim-dap-ui", enabled = false }, + { "jay-babu/mason-nvim-dap.nvim", enabled = false }, + -- { "jay-babu/mason-null-ls.nvim", enabled = false }, + { "b0o/schemastore.nvim", enabled = false }, + { "Wansmer/treesj", enabled = false }, - -- interface - -- { "HiPhish/rainbow-delimiters.nvim", enabled = true }, - { "ribru17/bamboo.nvim", enabled = true }, + -- interface + { "ribru17/bamboo.nvim", enabled = true }, - -- service - { "stevearc/resession.nvim", enabled = true }, - { "echasnovski/mini.move", enabled = true }, - { "nvim-neo-tree/neo-tree.nvim", enabled = true }, - { "folke/flash.nvim", enabled = true }, - { "github/copilot.vim", enabled = true }, + -- service + { "stevearc/resession.nvim", enabled = true }, + { "echasnovski/mini.move", enabled = true }, + { "nvim-neo-tree/neo-tree.nvim", enabled = true }, + { "folke/flash.nvim", enabled = true }, + { "github/copilot.vim", enabled = true }, - { "rafamadriz/friendly-snippets", enabled = false }, - { "JoosepAlviste/nvim-ts-context-commentstring", enabled = false }, - { "windwp/nvim-ts-autotag", enabled = false }, - { "saadparwaiz1/cmp_luasnip", enabled = false }, - { "L3MON4D3/LuaSnip", enabled = true }, + { "rafamadriz/friendly-snippets", enabled = false }, + { "JoosepAlviste/nvim-ts-context-commentstring", enabled = false }, + { "windwp/nvim-ts-autotag", enabled = false }, + { "saadparwaiz1/cmp_luasnip", enabled = false }, + { "L3MON4D3/LuaSnip", enabled = true }, } -- if true then return {} end diff --git a/lua/plugins/editor.lua b/lua/plugins/editor.lua index 22ee2d4..850d0e8 100644 --- a/lua/plugins/editor.lua +++ b/lua/plugins/editor.lua @@ -205,49 +205,55 @@ return { mode = { "n" }, desc = "Move to below split", }, + -- { + -- "", + -- function() require("smart-splits").resize_left() end, + -- mode = { "n" }, + -- desc = "Resize split left", + -- }, + -- { + -- "", + -- function() require("smart-splits").resize_right() end, + -- mode = { "n" }, + -- desc = "Resize split right", + -- }, + -- { + -- "", + -- function() require("smart-splits").resize_up() end, + -- mode = { "n" }, + -- desc = "Resize split up", + -- }, + -- { + -- "", + -- function() require("smart-splits").resize_down() end, + -- mode = { "n" }, + -- desc = "Resize split down", + -- }, + { - "", + "", function() require("smart-splits").resize_left() end, mode = { "n" }, desc = "Resize split left", }, { - "", + "", function() require("smart-splits").resize_right() end, mode = { "n" }, desc = "Resize split right", }, - { - "", - function() require("smart-splits").resize_up() end, - mode = { "n" }, - desc = "Resize split up", - }, - { - "", - function() require("smart-splits").resize_down() end, - mode = { "n" }, - desc = "Resize split down", - }, + -- { + -- "", + -- function() require("smart-splits").resize_up() end, + -- mode = { "n" }, + -- desc = "Resize split up", + -- }, + -- { + -- "", + -- function() require("smart-splits").resize_down() end, + -- mode = { "n" }, + -- desc = "Resize split down", + -- }, }, }, - -- -- Find and replace - -- { - -- "MagicDuck/grug-far.nvim", - -- cmd = "GrugFar", - -- config = function() - -- require("grug-far").setup { - -- windowCreationCommand = "tabnew", - -- } - -- end, - -- keys = { - -- { - -- "R", - -- function() require("grug-far").grug_far { prefills = { search = vim.fn.expand "" } } end, - -- mode = { "n" }, - -- desc = "Open GrugFar", - -- }, - -- }, - -- }, - -- Markdown preview support } diff --git a/lua/plugins/mason.lua b/lua/plugins/mason.lua index 73c9c66..7d52b41 100644 --- a/lua/plugins/mason.lua +++ b/lua/plugins/mason.lua @@ -10,8 +10,8 @@ return { -- add more things to the ensure_installed table protecting against community packs modifying it opts.ensure_installed = require("astrocore").list_insert_unique(opts.ensure_installed, { "lua_ls", - -- "jedi_language_server", - -- "ruff", + "jedi_language_server", + "ruff", "basedpyright", -- NOTE: "ty" is not a valid server name, so use masoninstall to install the server }) diff --git a/lua/plugins/neo-tree.lua b/lua/plugins/neo-tree.lua index 0b05209..f068129 100644 --- a/lua/plugins/neo-tree.lua +++ b/lua/plugins/neo-tree.lua @@ -1,4 +1,3 @@ --- NOTE: always show hidden files and dot files return { "nvim-neo-tree/neo-tree.nvim", opts = { @@ -9,23 +8,23 @@ return { filtered_items = { visible = true, show_hidden_count = true, - hide_dotfiles = true, - hide_gitignored = true, - hide_by_name = { - -- '.zip', - -- '.rar', - -- '.pdf', - -- '.DS_Store', - -- 'thumbs.db', - }, + hide_dotfiles = false, -- always show dotfiles + hide_gitignored = false, -- always show gitignored + hide_by_name = {}, never_show = {}, never_show_by_pattern = { -- uses glob style patterns "*.zip", "*.rar", - "*.pdf", + -- "*.pdf", }, }, }, + window = { + mappings = { + ["K"] = false, -- disable Shift+k + ["H"] = false, -- disable Shift+k + }, + }, enable_git_status = false, enable_diagnostics = false, git_status_async = false, diff --git a/lua/plugins/noice.lua b/lua/plugins/noice.lua index e3c58db..0d6e231 100644 --- a/lua/plugins/noice.lua +++ b/lua/plugins/noice.lua @@ -1,7 +1,7 @@ return { "folke/noice.nvim", event = "VeryLazy", - dependencies = { "MunifTanjim/nui.nvim"}, + dependencies = { "MunifTanjim/nui.nvim" }, config = function() require("noice").setup({ -- Configuration here, or leave empty to use defaults @@ -14,9 +14,9 @@ return { }, lsp = { override = { - ["vim.lsp.util.convert_input_to_markdown_lines"] = false, - ["vim.lsp.util.stylize_markdown"] = false, - ["cmp.entry.get_documentation"] = false, + ["vim.lsp.util.convert_input_to_markdown_lines"] = true, + ["vim.lsp.util.stylize_markdown"] = true, + ["cmp.entry.get_documentation"] = true, }, progress = { enabled = true, @@ -24,7 +24,7 @@ return { hover = { enabled = true, silent = true, - view = "hover", + view = nil, opts = { border = { style = "rounded", @@ -34,6 +34,9 @@ return { wrap = true, linebreak = true, }, + buf_options = { + filetype = "markdown", + }, }, }, signature = { @@ -43,13 +46,14 @@ return { enabled = false, }, }, + markdown = {}, presets = { - bottom_search = false, -- use a classic bottom cmdline for search - command_palette = true, -- position the cmdline and popupmenu together - long_message_to_split = false, -- long messages will be sent to a split - inc_rename = false, -- enables an input dialog for inc-rename.nvim - lsp_doc_border = false, -- add a border to hover docs and signature help + bottom_search = false, -- use a classic bottom cmdline for search + command_palette = true, -- position the cmdline and popupmenu together + long_message_to_split = true, -- long messages will be sent to a split + inc_rename = false, -- enables an input dialog for inc-rename.nvim + lsp_doc_border = false, -- add a border to hover docs and signature help }, routes = { diff --git a/lua/plugins/none-ls.lua b/lua/plugins/none-ls.lua index f341f44..419a9f9 100644 --- a/lua/plugins/none-ls.lua +++ b/lua/plugins/none-ls.lua @@ -11,12 +11,10 @@ return { -- config variable is the default configuration table for the setup function call local null_ls = require("null-ls") - -- Check supported formatters and linters - -- https://github.com/nvimtools/none-ls.nvim/tree/main/lua/null-ls/builtins/formatting - -- https://github.com/nvimtools/none-ls.nvim/tree/main/lua/null-ls/builtins/diagnostics opts.sources = { require("none-ls.formatting.ruff").with({ extra_args = { "--extend-select", "F" } }), require("none-ls.formatting.ruff_format"), -- Set a formatter + } return opts end, diff --git a/lua/plugins/treesitter.lua b/lua/plugins/treesitter.lua index c6b90a9..207c48d 100644 --- a/lua/plugins/treesitter.lua +++ b/lua/plugins/treesitter.lua @@ -2,33 +2,32 @@ ---@type LazySpec return { - { - "nvim-treesitter/nvim-treesitter", - dependencies = {}, - opts = function(_, opts) - -- add more things to the ensure_installed table protecting against community packs modifying it - opts.ignore_install = { "help" } - opts.ensure_installed = require("astrocore").list_insert_unique(opts.ensure_installed, { - -- "lua", - -- "c", - -- "cpp", - "python", - "latex", - "bibtex", - -- "javascript", - }) + { + "nvim-treesitter/nvim-treesitter", + dependencies = {}, + opts = function(_, opts) + -- add more things to the ensure_installed table protecting against community packs modifying it + opts.ignore_install = { "help" } + opts.ensure_installed = require("astrocore").list_insert_unique(opts.ensure_installed, { + -- "lua", + -- "c", + -- "cpp", + "python", + "latex", + -- "javascript", + }) - opts.highlight = { - enable = true, - disable = { "c", "rust", "tsx", "javascript" }, - additional_vim_regex_highlighting = false, - custom_captures = { - -- Highlight local variables - ["variable.local"] = "Identifier", - }, - } + opts.highlight = { + enable = true, + disable = { "c", "rust", "tsx", "javascript" }, + additional_vim_regex_highlighting = false, + custom_captures = { + -- Highlight local variables + ["variable.local"] = "Identifier", + }, + } - vim.api.nvim_set_hl(0, "Identifier", { fg = "#55ffff" }) - end, - }, + vim.api.nvim_set_hl(0, "Identifier", { fg = "#55ffff" }) + end, + }, }