feat: sync nvim with x-carbon branch

This commit is contained in:
2026-01-20 21:58:19 -08:00
parent 2812373aa8
commit bf0df4bd72
19 changed files with 719 additions and 399 deletions

View File

@@ -1,19 +0,0 @@
return{
"okuuva/auto-save.nvim",
--version = '*', -- see https://devhints.io/semver, alternatively use '*' to use the latest tagged release
cmd = "ASToggle", -- optional for lazy loading on command
execution_message = {
message = function() -- message to print on save
return ("AutoSave: saved at " .. vim.fn.strftime("%H:%M:%S"))
end,
dim = 0.18, -- dim the color of `message`
cleaning_interval = 1250, -- (milliseconds) automatically clean MsgArea after displaying `message`. See :h MsgArea
},
event = { "InsertLeave", "TextChanged" }, -- optional for lazy loading on trigger events
opts = {
-- your config goes here
-- or just leave it empty :)
enabled = false,
debug = true,
},
}

View File

@@ -1,19 +0,0 @@
return {
'stevearc/conform.nvim',
opts = {},
config = function ()
require("conform").setup({
formatters_by_ft = {
tex = { "latexindent" },
--lua = { "stylua" },
-- Conform will run multiple formatters sequentially
--python = { "isort", "black" },
-- You can customize some of the format options for the filetype (:help conform.format)
--rust = { "rustfmt", lsp_format = "fallback" },
-- Conform will run the first available formatter
--javascript = { "prettierd", "prettier", stop_after_first = true },
},
})
end
}

View File

@@ -1,12 +0,0 @@
return {
'github/copilot.vim',
config = function()
vim.keymap.set('i', '<C-J>', 'copilot#Accept("\\<CR>")', {
expr = true,
replace_keycodes = false
})
vim.keymap.set('i', '<C-L>', '<Plug>(copilot-accept-word)')
vim.g.copilot_enabled = 'v:false'
end
}

View File

@@ -1,23 +0,0 @@
return {
'ThePrimeagen/harpoon',
config = function(_, opts)
require('harpoon').setup(opts)
local mark = require('harpoon'.. ".mark")
local ui = require('harpoon'.. ".ui")
-- Harpoon marked files 1 through 4.
vim.keymap.set("n", "<a-1>", function() ui.nav_file(1) end)
vim.keymap.set("n", "<a-2>", function() ui.nav_file(2) end)
vim.keymap.set("n", "<a-3>", function() ui.nav_file(3) end)
vim.keymap.set("n", "<a-4>", function() ui.nav_file(4) end)
-- Harpoon next and previous.
vim.keymap.set("n", "<a-n>", function() ui.nav_next() end)
vim.keymap.set("n", "<a-p>", function() ui.nav_prev() end)
-- Harpoon user interface.
vim.keymap.set("n", "<leader>hq", ui.toggle_quick_menu)
vim.keymap.set("n", "<leader>ha", mark.add_file)
end
}

View File

@@ -1,12 +0,0 @@
return {
"mason-org/mason-lspconfig.nvim",
dependencies = {
"mason-org/mason.nvim",
"neovim/nvim-lspconfig",
"ms-jpq/coq_nvim", -- Optional (auto complete)
},
config = function()
--vim.lsp.config('lua_ls',coq.lsp_ensure_capabilities())
--vim.lsp.config('clangd',coq.lsp_ensure_capabilities())
end
}

View File

@@ -1,46 +0,0 @@
return{
'nvim-lualine/lualine.nvim',
dependencies = { 'nvim-tree/nvim-web-devicons', opt = true },
config = function()
require('lualine').setup {
options = {
icons_enabled = true,
theme = 'auto',
component_separators = { left = '', right = ''},
section_separators = { left = '', right = ''},
disabled_filetypes = {
statusline = {},
winbar = {},
},
ignore_focus = {},
always_divide_middle = true,
globalstatus = false,
refresh = {
statusline = 1000,
tabline = 1000,
winbar = 1000,
}
},
sections = {
lualine_a = {'mode'},
lualine_b = {'branch', 'diff', 'diagnostics'},
lualine_c = {'filename'},
lualine_x = {'encoding', 'fileformat', 'filetype'},
lualine_y = {'progress'},
lualine_z = {'location'}
},
inactive_sections = {
lualine_a = {},
lualine_b = {},
lualine_c = {'filename'},
lualine_x = {'location'},
lualine_y = {},
lualine_z = {}
},
tabline = {},
winbar = {},
inactive_winbar = {},
extensions = {}
}
end
}

View File

@@ -0,0 +1,54 @@
return {
"mason-org/mason-lspconfig.nvim",
dependencies = {
{"mason-org/mason.nvim"},
{'neovim/nvim-lspconfig'},
{'nvim-mini/mini.nvim'},
{'nvim-mini/mini.completion'},
},
config = function()
require("mason").setup()
require("mason-lspconfig").setup {}
-- NOTE: this is meant to be backwards compatible with Neovim v0.9
---
-- Autocompletion
---
require('mini.snippets').setup()
require('mini.completion').setup()
---
-- Language server configuration
---
-- These keymaps are the defaults in Neovim v0.10
if vim.fn.has('nvim-0.11') == 0 then
-- NOTE: vim.diagnostic.goto_* methods are deprecated in v0.11
-- that's why we put these under a conditional block
vim.keymap.set('n', '[d', '<cmd>lua vim.diagnostic.goto_prev()<cr>')
vim.keymap.set('n', ']d', '<cmd>lua vim.diagnostic.goto_next()<cr>')
vim.keymap.set('n', '<C-w>d', '<cmd>lua vim.diagnostic.open_float()<cr>')
vim.keymap.set('n', '<C-w><C-d>', '<cmd>lua vim.diagnostic.open_float()<cr>')
end
vim.api.nvim_create_autocmd('LspAttach', {
callback = function(event)
local bufmap = function(mode, rhs, lhs)
vim.keymap.set(mode, rhs, lhs, {buffer = event.buf})
end
-- These keymaps are the defaults in Neovim v0.11
bufmap('n', 'K', '<cmd>lua vim.lsp.buf.hover()<cr>')
bufmap('n', 'grr', '<cmd>lua vim.lsp.buf.references()<cr>')
bufmap('n', 'gri', '<cmd>lua vim.lsp.buf.implementation()<cr>')
bufmap('n', 'grn', '<cmd>lua vim.lsp.buf.rename()<cr>')
bufmap('n', 'gra', '<cmd>lua vim.lsp.buf.code_action()<cr>')
bufmap('n', 'gO', '<cmd>lua vim.lsp.buf.document_symbol()<cr>')
bufmap({'i', 's'}, '<C-s>', '<cmd>lua vim.lsp.buf.signature_help()<cr>')
end,
})
end
}

View File

@@ -1,26 +0,0 @@
return {
'MeanderingProgrammer/render-markdown.nvim',
-- dependencies = { 'nvim-treesitter/nvim-treesitter', 'echasnovski/mini.nvim' }, -- if you use the mini.nvim suite
-- dependencies = { 'nvim-treesitter/nvim-treesitter', 'echasnovski/mini.icons' }, -- if you use standalone mini plugins
-- dependencies = { 'nvim-treesitter/nvim-treesitter', 'nvim-tree/nvim-web-devicons' }, -- if you prefer nvim-web-devicons
---@module 'render-markdown'
---@type render.md.UserConfig
opts = {
completions = { lsp = { enabled = true } },
render_modes = true,
heading = {
width = 'block',
min_width = 80,
},
code = {
disable_background = { 'diff' },
},
indent = {
enabled = true,
skip_heading = true,
},
sign = {
enabled = true,
},
},
}

View File

@@ -1,12 +1,13 @@
-- plugins/telescope.lua:
return {
'nvim-telescope/telescope.nvim', tag = '0.1.2',
'nvim-telescope/telescope.nvim', tag = 'v0.1.9',
dependencies = { 'nvim-lua/plenary.nvim' },
config = function()
local builtin = require('telescope.builtin')
vim.keymap.set('n', '<leader>ff', builtin.find_files, {})
vim.keymap.set('n', '<leader>fg', builtin.live_grep, {})
vim.keymap.set('n', '<leader>fb', builtin.buffers, {})
vim.keymap.set('n', '<leader>fh', builtin.help_tags, {})
local builtin = require('telescope.builtin')
vim.keymap.set('n', '<leader>ff', builtin.find_files, {})
vim.keymap.set('n', '<leader>fg', builtin.live_grep, {})
vim.keymap.set('n', '<leader>fb', builtin.buffers, {})
vim.keymap.set('n', '<leader>fh', builtin.help_tags, {})
require('telescope').setup{
pickers = {

View File

@@ -1,11 +0,0 @@
return {
"folke/zen-mode.nvim",
opts = {
-- your configuration comes here
-- or leave it empty to use the default settings
-- refer to the configuration section below
window = {
width = 90, -- width of the Zen window
}
}
}