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
ecfa272a40
commit
77c3b62a35
9 changed files with 48 additions and 95 deletions
|
|
@ -7,7 +7,7 @@
|
|||
curl -fsSL https://raw.githubusercontent.com/harivansh-afk/nvim/main/install.sh | bash
|
||||
```
|
||||
|
||||
**Full install** - includes LSP + supermaven AI completion:
|
||||
**Full install** - includes LSP + Supermaven inline AI:
|
||||
```bash
|
||||
curl -fsSL https://raw.githubusercontent.com/harivansh-afk/nvim/main/install.sh | bash -s -- --bells-and-whistles
|
||||
```
|
||||
|
|
@ -38,9 +38,7 @@ Other options:
|
|||
│ ├── gitsigns.lua
|
||||
│ ├── gutentags.lua
|
||||
│ ├── lsp.lua
|
||||
│ ├── neo-tree.lua
|
||||
│ ├── nvchad.lua
|
||||
│ ├── supermaven.lua
|
||||
│ ├── telescope.lua
|
||||
│ ├── treesitter.lua
|
||||
│ └── which-key.lua
|
||||
|
|
@ -55,7 +53,7 @@ Other options:
|
|||
- `nvim-telescope/telescope.nvim`: fuzzy find + grep.
|
||||
- `nvim-treesitter/nvim-treesitter`: better syntax highlight/indent.
|
||||
- `neovim/nvim-lspconfig` + `williamboman/mason.nvim`: LSP + install servers.
|
||||
- `nvim-neo-tree/neo-tree.nvim`: file explorer.
|
||||
- `stevearc/oil.nvim`: file explorer.
|
||||
- `nvimdev/dashboard-nvim`: startup dashboard.
|
||||
- `folke/which-key.nvim`: keybind hint popup.
|
||||
- `numToStr/Comment.nvim`: quick commenting.
|
||||
|
|
@ -64,5 +62,5 @@ Other options:
|
|||
- `lewis6991/gitsigns.nvim`: git hunks in-buffer.
|
||||
- `NeogitOrg/neogit` + `sindrets/diffview.nvim`: git UI + diffs/history.
|
||||
- `ludovicchabant/vim-gutentags`: ctags-based fallback navigation.
|
||||
- `supermaven-inc/supermaven-nvim`: AI inline suggestions.
|
||||
- `supermaven-inc/supermaven-nvim`: inline AI suggestions.
|
||||
- `otavioschwanck/arrow.nvim`: quick file marks/jumps.
|
||||
|
|
|
|||
|
|
@ -1,17 +1,13 @@
|
|||
{
|
||||
"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" },
|
||||
"neo-tree.nvim": { "branch": "v3.x", "commit": "f3df514fff2bdd4318127c40470984137f87b62e" },
|
||||
"nonicons.nvim": { "branch": "main", "commit": "62549ecb9906e4216398c44af96719ca4cc670ef" },
|
||||
"nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" },
|
||||
"nvim-autopairs": { "branch": "master", "commit": "59bce2eef357189c3305e25bc6dd2d138c1683f5" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "44acfe887d4056f704ccc4f17513ed41c9e2b2e6" },
|
||||
"nvim-surround": { "branch": "main", "commit": "1098d7b3c34adcfa7feb3289ee434529abd4afd1" },
|
||||
|
|
@ -21,9 +17,7 @@
|
|||
"nvim-web-devicons": { "branch": "master", "commit": "746ffbb17975ebd6c40142362eee1b0249969c5c" },
|
||||
"oil-git.nvim": { "branch": "main", "commit": "c99db7b1dd8dd500c3ec530dc07000dfbeb6e080" },
|
||||
"oil.nvim": { "branch": "master", "commit": "f55b25e493a7df76371cfadd0ded5004cb9cd48a" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
|
||||
"promise-async": { "branch": "main", "commit": "119e8961014c9bfaf1487bf3c2a393d254f337e2" },
|
||||
"snacks.nvim": { "branch": "main", "commit": "fe7cfe9800a182274d0f868a74b7263b8c0c020b" },
|
||||
"supermaven-nvim": { "branch": "main", "commit": "07d20fce48a5629686aefb0a7cd4b25e33947d50" },
|
||||
"vim-fugitive": { "branch": "master", "commit": "61b51c09b7c9ce04e821f6cf76ea4f6f903e3cf4" }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,10 +27,6 @@ end
|
|||
|
||||
-- Return default capabilities for LSP servers
|
||||
function M.capabilities()
|
||||
local ok, blink = pcall(require, "blink.cmp")
|
||||
if ok then
|
||||
return blink.get_lsp_capabilities()
|
||||
end
|
||||
return vim.lsp.protocol.make_client_capabilities()
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -52,24 +52,27 @@ return {
|
|||
},
|
||||
},
|
||||
|
||||
-- Supermaven AI completion
|
||||
-- Supermaven inline suggestions (accepted with Tab)
|
||||
{
|
||||
"supermaven-inc/supermaven-nvim",
|
||||
event = "InsertEnter",
|
||||
config = function(_, opts)
|
||||
require("supermaven-nvim").setup(opts)
|
||||
end,
|
||||
opts = {
|
||||
keymaps = {
|
||||
accept_suggestion = "<Tab>",
|
||||
clear_suggestion = "<C-]>",
|
||||
accept_word = "<C-j>",
|
||||
},
|
||||
ignore_filetypes = { "gitcommit", "TelescopePrompt" },
|
||||
disable_keymaps = false,
|
||||
ignore_filetypes = { gitcommit = true },
|
||||
color = {
|
||||
suggestion_color = vim.api.nvim_get_hl(0, { name = "Comment" }).fg,
|
||||
cterm = 244,
|
||||
},
|
||||
log_level = "info",
|
||||
disable_inline_completion = false,
|
||||
disable_keymaps = false,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,37 @@
|
|||
local function current_file_location()
|
||||
local root = vim.trim(vim.fn.system("git rev-parse --show-toplevel"))
|
||||
if vim.v.shell_error ~= 0 or root == "" then
|
||||
return nil
|
||||
end
|
||||
|
||||
local path = vim.api.nvim_buf_get_name(0)
|
||||
if path == "" then
|
||||
return nil
|
||||
end
|
||||
|
||||
local prefix = root .. "/"
|
||||
if path:sub(1, #prefix) ~= prefix then
|
||||
return nil
|
||||
end
|
||||
|
||||
local rel = path:sub(#prefix + 1)
|
||||
return ("%s:%d"):format(rel, vim.fn.line("."))
|
||||
end
|
||||
|
||||
local function gh_browse()
|
||||
if vim.fn.executable("gh") ~= 1 then
|
||||
vim.notify("gh CLI not found", vim.log.levels.WARN)
|
||||
return
|
||||
end
|
||||
|
||||
local loc = current_file_location()
|
||||
if loc then
|
||||
vim.system({ "gh", "browse", loc })
|
||||
return
|
||||
end
|
||||
vim.system({ "gh", "browse" })
|
||||
end
|
||||
|
||||
return {
|
||||
-- Fugitive: The gold standard for Git in Vim
|
||||
{
|
||||
|
|
@ -12,6 +46,7 @@ return {
|
|||
{ "<leader>gd", "<cmd>Gvdiffsplit<cr>", desc = "Git diff vertical" },
|
||||
{ "<leader>gr", "<cmd>Gread<cr>", desc = "Git checkout file" },
|
||||
{ "<leader>gw", "<cmd>Gwrite<cr>", desc = "Git add file" },
|
||||
{ "<leader>go", gh_browse, desc = "Open in GitHub" },
|
||||
},
|
||||
},
|
||||
|
||||
|
|
@ -54,18 +89,6 @@ return {
|
|||
},
|
||||
},
|
||||
|
||||
-- Snacks: GitHub integration (browse, issues, PRs)
|
||||
{
|
||||
"folke/snacks.nvim",
|
||||
lazy = false,
|
||||
opts = {
|
||||
gitbrowse = {},
|
||||
},
|
||||
keys = {
|
||||
{ "<leader>go", function() Snacks.gitbrowse() end, desc = "Open in GitHub" },
|
||||
},
|
||||
},
|
||||
|
||||
-- Diffs.nvim: Better diff highlighting
|
||||
{
|
||||
"barrettruth/diffs.nvim",
|
||||
|
|
|
|||
|
|
@ -1,24 +1,3 @@
|
|||
return {
|
||||
{ "neovim/nvim-lspconfig", lazy = false },
|
||||
|
||||
-- Autocompletion
|
||||
{
|
||||
"saghen/blink.cmp",
|
||||
dependencies = { "rafamadriz/friendly-snippets" },
|
||||
version = "1.*",
|
||||
event = "InsertEnter",
|
||||
|
||||
---@module 'blink.cmp'
|
||||
---@type blink.cmp.Config
|
||||
opts = {
|
||||
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" },
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,9 +1,11 @@
|
|||
return {
|
||||
"stevearc/oil.nvim",
|
||||
dependencies = { "nvim-tree/nvim-web-devicons", "malewicz1337/oil-git.nvim" },
|
||||
cmd = "Oil",
|
||||
event = 'VeryLazy',
|
||||
keys = {
|
||||
{ "-", "<cmd>Oil<cr>", desc = "Open parent directory" },
|
||||
{ "<leader>e", "<cmd>Oil<cr>", desc = "Open file explorer" },
|
||||
},
|
||||
config = function(_, opts)
|
||||
require("oil").setup(opts)
|
||||
|
|
|
|||
|
|
@ -1,43 +0,0 @@
|
|||
return {
|
||||
"nvim-neo-tree/neo-tree.nvim",
|
||||
branch = "v3.x",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
"nvim-tree/nvim-web-devicons",
|
||||
"MunifTanjim/nui.nvim",
|
||||
},
|
||||
cmd = "Neotree",
|
||||
keys = {
|
||||
{ "<C-e>", "<cmd>Neotree toggle<cr>", desc = "Toggle file explorer" },
|
||||
{ "<leader>e", "<cmd>Neotree toggle<cr>", desc = "Toggle file explorer" },
|
||||
{ "<BS>", "<cmd>Neotree toggle<cr>", desc = "Toggle file explorer" },
|
||||
{ "<leader>gs", "<cmd>Neotree git_status left<cr>", desc = "Git status tree" },
|
||||
},
|
||||
config = function()
|
||||
require("neo-tree").setup({
|
||||
close_if_last_window = true,
|
||||
window = {
|
||||
width = 30,
|
||||
mappings = {
|
||||
["<space>"] = "none",
|
||||
},
|
||||
},
|
||||
-- Source selector at top (just Files, no Git tab)
|
||||
source_selector = {
|
||||
winbar = false,
|
||||
},
|
||||
filesystem = {
|
||||
follow_current_file = {
|
||||
enabled = true,
|
||||
leave_dirs_open = false,
|
||||
},
|
||||
filtered_items = {
|
||||
visible = true,
|
||||
hide_dotfiles = false,
|
||||
hide_gitignored = false,
|
||||
hide_hidden = false,
|
||||
},
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
||||
|
|
@ -32,6 +32,7 @@ return {
|
|||
transparent_mode = true,
|
||||
})
|
||||
vim.cmd.colorscheme("gruvbox")
|
||||
|
||||
end,
|
||||
},
|
||||
|
||||
|
|
@ -120,7 +121,7 @@ return {
|
|||
icon = " ",
|
||||
desc = "File Explorer ",
|
||||
key = "e",
|
||||
action = function() vim.cmd("Neotree toggle") end,
|
||||
action = function() vim.cmd("Oil") end,
|
||||
},
|
||||
{
|
||||
icon = " ",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue