mirror of
https://github.com/harivansh-afk/nvim.git
synced 2026-04-15 08:03:44 +00:00
clean
This commit is contained in:
parent
3b6293a458
commit
ecfa272a40
6 changed files with 24 additions and 61 deletions
|
|
@ -1,16 +1,14 @@
|
|||
{
|
||||
"Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
|
||||
"cp.nvim": { "branch": "main", "commit": "c192afc5d7d8ae4b852471432be02390b955d874" },
|
||||
"blink.cmp": { "branch": "main", "commit": "4b18c32adef2898f95cdef6192cbd5796c1a332d" },
|
||||
"dashboard-nvim": { "branch": "master", "commit": "0775e567b6c0be96d01a61795f7b64c1758262f6" },
|
||||
"diffs.nvim": { "branch": "main", "commit": "b1abfe4f4a164ad776148ca36f852df4f1e4014e" },
|
||||
"flash.nvim": { "branch": "main", "commit": "fcea7ff883235d9024dc41e638f164a450c14ca2" },
|
||||
"friendly-snippets": { "branch": "main", "commit": "6cd7280adead7f586db6fccbd15d2cac7e2188b9" },
|
||||
"fzf-lua": { "branch": "main", "commit": "b2c0603216adb92c6bba81053bc996d7ae95b77a" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "9f3c6dd7868bcc116e9c1c1929ce063b978fa519" },
|
||||
"gruvbox.nvim": { "branch": "main", "commit": "561126520034a1dac2f78ab063db025d12555998" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "47f91c416daef12db467145e16bed5bbfe00add8" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "21c2a84ce368e99b18f52ab348c4c02c32c02fcf" },
|
||||
"mason.nvim": { "branch": "main", "commit": "44d1e90e1f66e077268191e3ee9d2ac97cc18e65" },
|
||||
"neo-tree.nvim": { "branch": "v3.x", "commit": "f3df514fff2bdd4318127c40470984137f87b62e" },
|
||||
"nonicons.nvim": { "branch": "main", "commit": "62549ecb9906e4216398c44af96719ca4cc670ef" },
|
||||
"nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" },
|
||||
|
|
@ -27,6 +25,5 @@
|
|||
"promise-async": { "branch": "main", "commit": "119e8961014c9bfaf1487bf3c2a393d254f337e2" },
|
||||
"snacks.nvim": { "branch": "main", "commit": "fe7cfe9800a182274d0f868a74b7263b8c0c020b" },
|
||||
"supermaven-nvim": { "branch": "main", "commit": "07d20fce48a5629686aefb0a7cd4b25e33947d50" },
|
||||
"vim-fugitive": { "branch": "master", "commit": "61b51c09b7c9ce04e821f6cf76ea4f6f903e3cf4" },
|
||||
"which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" }
|
||||
"vim-fugitive": { "branch": "master", "commit": "61b51c09b7c9ce04e821f6cf76ea4f6f903e3cf4" }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,15 +27,11 @@ end
|
|||
|
||||
-- Return default capabilities for LSP servers
|
||||
function M.capabilities()
|
||||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||
|
||||
-- If nvim-cmp is available, extend capabilities
|
||||
local ok, cmp_nvim_lsp = pcall(require, "cmp_nvim_lsp")
|
||||
local ok, blink = pcall(require, "blink.cmp")
|
||||
if ok then
|
||||
capabilities = vim.tbl_deep_extend("force", capabilities, cmp_nvim_lsp.default_capabilities())
|
||||
return blink.get_lsp_capabilities()
|
||||
end
|
||||
|
||||
return capabilities
|
||||
return vim.lsp.protocol.make_client_capabilities()
|
||||
end
|
||||
|
||||
return M
|
||||
|
|
|
|||
|
|
@ -8,22 +8,6 @@ return {
|
|||
end,
|
||||
},
|
||||
|
||||
-- Comment.nvim
|
||||
{
|
||||
"numToStr/Comment.nvim",
|
||||
keys = {
|
||||
{ "gcc", mode = "n", desc = "Comment toggle current line" },
|
||||
{ "gc", mode = { "n", "o" }, desc = "Comment toggle linewise" },
|
||||
{ "gc", mode = "x", desc = "Comment toggle linewise (visual)" },
|
||||
{ "gbc", mode = "n", desc = "Comment toggle current block" },
|
||||
{ "gb", mode = { "n", "o" }, desc = "Comment toggle blockwise" },
|
||||
{ "gb", mode = "x", desc = "Comment toggle blockwise (visual)" },
|
||||
},
|
||||
config = function()
|
||||
require("Comment").setup()
|
||||
end,
|
||||
},
|
||||
|
||||
-- Flash.nvim for navigation
|
||||
{
|
||||
"folke/flash.nvim",
|
||||
|
|
|
|||
|
|
@ -1,21 +1,24 @@
|
|||
return {
|
||||
{ "neovim/nvim-lspconfig", lazy = false },
|
||||
{ "williamboman/mason.nvim", lazy = false, opts = {} },
|
||||
|
||||
-- Autocompletion
|
||||
{
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
lazy = false,
|
||||
"saghen/blink.cmp",
|
||||
dependencies = { "rafamadriz/friendly-snippets" },
|
||||
version = "1.*",
|
||||
event = "InsertEnter",
|
||||
|
||||
---@module 'blink.cmp'
|
||||
---@type blink.cmp.Config
|
||||
opts = {
|
||||
ensure_installed = {
|
||||
"lua_ls",
|
||||
"pyright",
|
||||
"rust_analyzer",
|
||||
"gopls",
|
||||
"clangd",
|
||||
"bashls",
|
||||
"jsonls",
|
||||
"html",
|
||||
"cssls",
|
||||
keymap = { preset = "default" },
|
||||
appearance = { nerd_font_variant = "mono" },
|
||||
completion = { documentation = { auto_show = true } },
|
||||
sources = {
|
||||
default = { "lsp", "path", "snippets", "buffer" },
|
||||
},
|
||||
fuzzy = { implementation = "prefer_rust_with_warning" },
|
||||
},
|
||||
opts_extend = { "sources.default" },
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -142,23 +142,4 @@ return {
|
|||
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||
},
|
||||
|
||||
-- Which-key for keybinding hints
|
||||
{
|
||||
"folke/which-key.nvim",
|
||||
event = "VeryLazy",
|
||||
opts = {
|
||||
win = {
|
||||
border = { "┏", "━", "┓", "┃", "┛", "━", "┗", "┃" },
|
||||
},
|
||||
},
|
||||
keys = {
|
||||
{
|
||||
"<leader>?",
|
||||
function()
|
||||
require("which-key").show({ global = false })
|
||||
end,
|
||||
desc = "Buffer Local Keymaps (which-key)",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,6 +15,8 @@ api.nvim_create_autocmd("TextYankPost", {
|
|||
api.nvim_create_autocmd("BufReadPost", {
|
||||
group = augroup,
|
||||
callback = function()
|
||||
local excluded = { gitcommit = true, gitrebase = true }
|
||||
if excluded[vim.bo.filetype] then return end
|
||||
local mark = api.nvim_buf_get_mark(0, '"')
|
||||
local line_count = api.nvim_buf_line_count(0)
|
||||
if mark[1] > 0 and mark[1] <= line_count then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue