astro-nvim-v3 - uptostate

This commit is contained in:
huyjaky
2025-08-16 19:57:11 +07:00
parent 182ad7856a
commit 4b6f99b5a8
16 changed files with 248 additions and 228 deletions

View File

@@ -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

View File

@@ -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" },

View File

@@ -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", "<Nop>", { silent = true })
-- NOTE: Set colors for hightlights for similar words
-- vim.api.nvim_set_hl(0, "LspReferenceRead", { fg = "#FF0000" })

View File

@@ -61,10 +61,6 @@ return function()
------ My customs keybinding ------
mappings.n["<leader>xn"] = { "<Cmd>Telescope notify<CR>", desc = "Notifications" }
mappings.i["VK"] = false
mappings.v["VK"] = false
mappings.n["VK"] = false
return mappings
end

View File

@@ -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

View File

@@ -16,6 +16,5 @@ return {
icons = require "plugins.configs.ui.icons",
status = require "plugins.configs.ui.status",
lazygit = false,
},
}

View File

@@ -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",

View File

@@ -11,7 +11,8 @@ return {
enable = true,
},
workspace = {
environmentPath = "/home/duckq1u/miniconda3/envs/OCR3/bin/python",
-- 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",
},

View File

@@ -22,7 +22,6 @@ return {
{ "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 },
@@ -41,7 +40,6 @@ return {
{ "Wansmer/treesj", enabled = false },
-- interface
-- { "HiPhish/rainbow-delimiters.nvim", enabled = true },
{ "ribru17/bamboo.nvim", enabled = true },
-- service

View File

@@ -205,49 +205,55 @@ return {
mode = { "n" },
desc = "Move to below split",
},
-- {
-- "<A-Left>",
-- function() require("smart-splits").resize_left() end,
-- mode = { "n" },
-- desc = "Resize split left",
-- },
-- {
-- "<A-Right>",
-- function() require("smart-splits").resize_right() end,
-- mode = { "n" },
-- desc = "Resize split right",
-- },
-- {
-- "<A-Up>",
-- function() require("smart-splits").resize_up() end,
-- mode = { "n" },
-- desc = "Resize split up",
-- },
-- {
-- "<A-Down>",
-- function() require("smart-splits").resize_down() end,
-- mode = { "n" },
-- desc = "Resize split down",
-- },
{
"<A-Left>",
"<S-h>",
function() require("smart-splits").resize_left() end,
mode = { "n" },
desc = "Resize split left",
},
{
"<A-Right>",
"<S-l>",
function() require("smart-splits").resize_right() end,
mode = { "n" },
desc = "Resize split right",
},
{
"<A-Up>",
function() require("smart-splits").resize_up() end,
mode = { "n" },
desc = "Resize split up",
},
{
"<A-Down>",
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 = {
-- {
-- "<Leader>R",
-- function() require("grug-far").grug_far { prefills = { search = vim.fn.expand "<cword>" } } end,
-- "<S-k>",
-- function() require("smart-splits").resize_up() end,
-- mode = { "n" },
-- desc = "Open GrugFar",
-- desc = "Resize split up",
-- },
-- {
-- "<S-j>",
-- function() require("smart-splits").resize_down() end,
-- mode = { "n" },
-- desc = "Resize split down",
-- },
-- },
-- Markdown preview support
},
},
}

View File

@@ -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
})

View File

@@ -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,

View File

@@ -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,11 +46,12 @@ 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
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
},

View File

@@ -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,

View File

@@ -14,7 +14,6 @@ return {
-- "cpp",
"python",
"latex",
"bibtex",
-- "javascript",
})