Last active
March 25, 2026 02:48
-
-
Save featuriz/111102fd717345483ef4d703f1478d51 to your computer and use it in GitHub Desktop.
NeoVim - Golang
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- Bootstrap lazy.nvim | |
| local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" | |
| if not (vim.uv or vim.loop).fs_stat(lazypath) then | |
| local lazyrepo = "https://github.com/folke/lazy.nvim.git" | |
| local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) | |
| if vim.v.shell_error ~= 0 then | |
| vim.api.nvim_echo({ | |
| { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, | |
| { out, "WarningMsg" }, | |
| { "\nPress any key to exit..." }, | |
| }, true, {}) | |
| vim.fn.getchar() | |
| os.exit(1) | |
| end | |
| end | |
| vim.opt.rtp:prepend(lazypath) | |
| -- Make sure to setup `mapleader` and `maplocalleader` before | |
| -- loading lazy.nvim so that mappings are correct. | |
| -- This is also a good place to setup other settings (vim.opt) | |
| vim.g.mapleader = " " | |
| vim.g.maplocalleader = "\\" | |
| -- Setup lazy.nvim | |
| require("lazy").setup({ | |
| spec = { | |
| -- import your plugins | |
| { import = "plugins" }, | |
| }, | |
| -- Configure any other settings here. See the documentation for more details. | |
| -- colorscheme that will be used when installing plugins. | |
| install = { colorscheme = { "habamax" } }, | |
| -- automatically check for plugin updates | |
| checker = { enabled = true }, | |
| }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- ============================================================================ | |
| -- LSP, Linting, Formatting & Completion | |
| -- ============================================================================ | |
| local diagnostic_signs = { | |
| Error = " ", | |
| Warn = " ", | |
| Hint = "", | |
| Info = "", | |
| } | |
| vim.diagnostic.config({ | |
| virtual_text = { prefix = "●", spacing = 4 }, | |
| signs = { | |
| text = { | |
| [vim.diagnostic.severity.ERROR] = diagnostic_signs.Error, | |
| [vim.diagnostic.severity.WARN] = diagnostic_signs.Warn, | |
| [vim.diagnostic.severity.INFO] = diagnostic_signs.Info, | |
| [vim.diagnostic.severity.HINT] = diagnostic_signs.Hint, | |
| }, | |
| }, | |
| underline = true, | |
| update_in_insert = false, | |
| severity_sort = true, | |
| float = { | |
| border = "rounded", | |
| source = "always", | |
| header = "", | |
| prefix = "", | |
| focusable = false, | |
| style = "minimal", | |
| }, | |
| }) | |
| vim.lsp.config["*"] = { | |
| capabilities = require("blink.cmp").get_lsp_capabilities(), | |
| } | |
| -- Use the new API: vim.lsp.config | |
| vim.lsp.config["lua_ls"] = { | |
| settings = { | |
| Lua = { | |
| diagnostics = { | |
| globals = { "vim" }, -- Fix "Undefined global 'vim'" | |
| }, | |
| workspace = { | |
| library = vim.api.nvim_get_runtime_file("", true), | |
| checkThirdParty = false, | |
| }, | |
| completion = { | |
| callSnippet = "Replace", | |
| }, | |
| telemetry = { enable = false }, | |
| }, | |
| }, | |
| } | |
| vim.lsp.enable("lua_ls") | |
| -- Go | |
| vim.lsp.config["gopls"] = { | |
| settings = { | |
| gopls = { | |
| analyses = { unusedparams = true }, | |
| staticcheck = true, | |
| gofumpt = true, | |
| }, | |
| }, | |
| } | |
| vim.lsp.enable("gopls") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- ============================================================================ | |
| -- STATUSLINE | |
| -- ============================================================================ | |
| -- Git branch function with caching and Nerd Font icon | |
| local cached_branch = "" | |
| local last_check = 0 | |
| local function git_branch() | |
| local now = os.time() -- Use standard Lua seconds | |
| -- Check every 5 seconds | |
| if now - last_check > 5 then | |
| -- Execute git command and capture output | |
| local handle = io.popen("git branch --show-current 2>/dev/null") | |
| if handle then | |
| local result = handle:read("*a") | |
| handle:close() | |
| cached_branch = result:gsub("%s+", "") -- Remove all whitespace/newlines | |
| end | |
| last_check = now | |
| end | |
| if cached_branch ~= "" then | |
| -- This is the most reliable way to show the Git Icon (0xe725) | |
| local icon = vim.fn.nr2char(0xe725) | |
| return " " .. icon .. " " .. cached_branch .. " " | |
| end | |
| return "" | |
| end | |
| -- File type with Nerd Font icon | |
| local function file_type() | |
| local ft = vim.bo.filetype | |
| local icons = { | |
| lua = "\u{e620} ", -- nf-dev-lua | |
| python = "\u{e73c} ", -- nf-dev-python | |
| javascript = "\u{e74e} ", -- nf-dev-javascript | |
| typescript = "\u{e628} ", -- nf-dev-typescript | |
| javascriptreact = "\u{e7ba} ", | |
| typescriptreact = "\u{e7ba} ", | |
| html = "\u{e736} ", -- nf-dev-html5 | |
| css = "\u{e749} ", -- nf-dev-css3 | |
| scss = "\u{e749} ", | |
| json = "\u{e60b} ", -- nf-dev-json | |
| markdown = "\u{e73e} ", -- nf-dev-markdown | |
| vim = "\u{e62b} ", -- nf-dev-vim | |
| sh = "\u{f489} ", -- nf-oct-terminal | |
| bash = "\u{f489} ", | |
| zsh = "\u{f489} ", | |
| rust = "\u{e7a8} ", -- nf-dev-rust | |
| go = "\u{e724} ", -- nf-dev-go | |
| c = "\u{e61e} ", -- nf-dev-c | |
| cpp = "\u{e61d} ", -- nf-dev-cplusplus | |
| java = "\u{e738} ", -- nf-dev-java | |
| php = "\u{e73d} ", -- nf-dev-php | |
| ruby = "\u{e739} ", -- nf-dev-ruby | |
| swift = "\u{e755} ", -- nf-dev-swift | |
| kotlin = "\u{e634} ", | |
| dart = "\u{e798} ", | |
| elixir = "\u{e62d} ", | |
| haskell = "\u{e777} ", | |
| sql = "\u{e706} ", | |
| yaml = "\u{f481} ", | |
| toml = "\u{e615} ", | |
| xml = "\u{f05c} ", | |
| dockerfile = "\u{f308} ", -- nf-linux-docker | |
| gitcommit = "\u{f418} ", -- nf-oct-git_commit | |
| gitconfig = "\u{f1d3} ", -- nf-fa-git | |
| vue = "\u{fd42} ", -- nf-md-vuejs | |
| svelte = "\u{e697} ", | |
| astro = "\u{e628} ", | |
| } | |
| if ft == "" then | |
| return " \u{f15b} " -- nf-fa-file_o | |
| end | |
| return ((icons[ft] or " \u{f15b} ") .. ft) | |
| end | |
| -- File size with Nerd Font icon | |
| local function file_size() | |
| local size = vim.fn.getfsize(vim.fn.expand("%")) | |
| if size < 0 then | |
| return "" | |
| end | |
| local size_str | |
| if size < 1024 then | |
| size_str = size .. "B" | |
| elseif size < 1024 * 1024 then | |
| size_str = string.format("%.1fK", size / 1024) | |
| else | |
| size_str = string.format("%.1fM", size / 1024 / 1024) | |
| end | |
| return size_str -- nf-fa-file_o | |
| end | |
| -- Mode indicators with Nerd Font icons | |
| local function mode_icon() | |
| local mode = vim.fn.mode() | |
| local modes = { | |
| n = " \u{f121} NORMAL", | |
| i = " \u{f11c} INSERT", | |
| v = " \u{f0168} VISUAL", | |
| V = " \u{f0168} V-LINE", | |
| ["\22"] = " \u{f0168} V-BLOCK", | |
| c = " \u{f120} COMMAND", | |
| s = " \u{f0c5} SELECT", | |
| S = " \u{f0c5} S-LINE", | |
| ["\19"] = " \u{f0c5} S-BLOCK", | |
| R = " \u{f044} REPLACE", | |
| r = " \u{f044} REPLACE", | |
| ["!"] = " \u{f489} SHELL", | |
| t = " \u{f120} TERMINAL", | |
| } | |
| return modes[mode] or (" \u{f059} " .. mode) | |
| end | |
| _G.mode_icon = mode_icon | |
| _G.git_branch = git_branch | |
| _G.file_type = file_type | |
| _G.file_size = file_size | |
| vim.cmd([[ | |
| highlight StatusLineBold gui=bold cterm=bold | |
| ]]) | |
| -- Function to change statusline based on window focus | |
| local function setup_dynamic_statusline() | |
| vim.api.nvim_create_autocmd({ "WinEnter", "BufEnter" }, { | |
| group = vim.api.nvim_create_augroup("StatusLineGroup", { clear = true }), | |
| callback = function() | |
| vim.opt_local.statusline = table.concat({ | |
| " ", | |
| "%#StatusLineBold#", | |
| "%{v:lua.mode_icon()}", -- </> icon | |
| "%#StatusLine#", -- INSERT names | |
| " \u{e0b1} ", -- > icon | |
| "%f %h%m%r", -- Directory + File name | |
| "%{v:lua.git_branch()}", -- GIT branch | |
| " \u{e0b1} ", -- > icon | |
| "%{v:lua.file_type()}", -- File type | |
| " \u{e0b1} ", -- > icon | |
| "%{v:lua.file_size()}", -- File size | |
| "%=", -- Push AI/Clock to the right | |
| "%l:%c", -- Cleaned up spacing | |
| " \u{e0b3} ", -- Space around the clock icon | |
| "%P", -- Cleaned up spacing | |
| " ", | |
| }) | |
| end, | |
| }) | |
| -- Inactive window statusline | |
| vim.api.nvim_create_autocmd({ "WinLeave", "BufLeave" }, { | |
| callback = function() | |
| vim.opt_local.statusline = " %f %h%m%r \u{e0b1} %{v:lua.file_type()} %= %l:%c %P " | |
| end, | |
| }) | |
| vim.api.nvim_set_hl(0, "StatusLineBold", { bold = true }) | |
| end | |
| setup_dynamic_statusline() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- https://github.com/radleylewis/nvim-lite/blob/master/init.lua | |
| -- | |
| require("config.lazy") | |
| -- require("config.cmp") | |
| require("config.status_line") | |
| require("config.lsp") | |
| -- require("config.other") | |
| -- Color | |
| vim.opt.termguicolors = true | |
| vim.cmd.colorscheme("habamax") | |
| -- ============================================================================ | |
| -- OPTIONS | |
| -- ============================================================================ | |
| vim.opt.number = true -- line number | |
| vim.opt.relativenumber = true -- relative line numbers | |
| -- vim.opt.statuscolumn = "%s %{v:lnum} %{v:relnum} " | |
| vim.opt.cursorline = true -- highlight current line | |
| vim.opt.wrap = false -- do not wrap lines by default | |
| vim.opt.scrolloff = 10 -- keep 10 lines above/below cursor | |
| vim.opt.sidescrolloff = 10 -- keep 10 lines to left/right of cursor | |
| vim.opt.tabstop = 2 -- tabwidth | |
| vim.opt.shiftwidth = 2 -- indent width | |
| vim.opt.softtabstop = 2 -- soft tab stop not tabs on tab/backspace | |
| vim.opt.expandtab = true -- use spaces instead of tabs | |
| vim.opt.smartindent = true -- smart auto-indent | |
| vim.opt.autoindent = true -- copy indent from current line | |
| vim.opt.ignorecase = true -- case insensitive search | |
| vim.opt.smartcase = true -- case sensitive if uppercase in string | |
| vim.opt.hlsearch = true -- highlight search matches | |
| vim.opt.incsearch = true -- show matches as you type | |
| vim.opt.signcolumn = "yes" -- always show a sign column | |
| vim.opt.colorcolumn = "100" -- show a column at 100 position chars | |
| vim.opt.showmatch = true -- highlights matching brackets | |
| vim.opt.cmdheight = 1 -- single line command line | |
| vim.opt.completeopt = "menuone,noinsert,noselect" -- completion options | |
| vim.opt.showmode = false -- do not show the mode, instead have it in statusline | |
| vim.opt.pumheight = 10 -- popup menu height | |
| vim.opt.pumblend = 10 -- popup menu transparency | |
| vim.opt.winblend = 0 -- floating window transparency | |
| vim.opt.conceallevel = 0 -- do not hide markup | |
| vim.opt.concealcursor = "" -- do not hide cursorline in markup | |
| vim.opt.lazyredraw = true -- do not redraw during macros | |
| vim.opt.synmaxcol = 300 -- syntax highlighting limit | |
| vim.opt.fillchars = { eob = " " } -- hide "~" on empty lines | |
| -- UNDO: Keep in a file for later use | |
| local undodir = vim.fn.expand("~/.vim/undodir") | |
| if | |
| vim.fn.isdirectory(undodir) == 0 -- create undodir if nonexistent | |
| then | |
| vim.fn.mkdir(undodir, "p") | |
| end | |
| vim.opt.backup = false -- do not create a backup file | |
| vim.opt.writebackup = false -- do not write to a backup file | |
| vim.opt.swapfile = false -- do not create a swapfile | |
| vim.opt.undofile = true -- do create an undo file | |
| vim.opt.undodir = undodir -- set the undo directory | |
| vim.opt.updatetime = 300 -- faster completion | |
| vim.opt.timeoutlen = 500 -- timeout duration | |
| vim.opt.ttimeoutlen = 0 -- key code timeout | |
| vim.opt.autoread = true -- auto-reload changes if outside of neovim | |
| vim.opt.autowrite = false -- do not auto-save | |
| vim.opt.hidden = true -- allow hidden buffers | |
| vim.opt.errorbells = false -- no error sounds | |
| vim.opt.backspace = "indent,eol,start" -- better backspace behaviour | |
| vim.opt.autochdir = false -- do not autochange directories | |
| vim.opt.iskeyword:append("-") -- include - in words | |
| vim.opt.path:append("**") -- include subdirs in search | |
| vim.opt.selection = "inclusive" -- include last char in selection | |
| vim.opt.mouse = "a" -- enable mouse support | |
| vim.opt.clipboard:append("unnamedplus") -- use system clipboard | |
| vim.opt.modifiable = true -- allow buffer modifications | |
| vim.opt.encoding = "utf-8" -- set encoding | |
| -- CURSOR: Blink | |
| vim.opt.guicursor = | |
| "n-v-c:block,i-ci-ve:block,r-cr:hor20,o:hor50,a:blinkwait700-blinkoff400-blinkon250-Cursor/lCursor,sm:block-blinkwait175-blinkoff150-blinkon175" -- cursor blinking and settings | |
| -- Folding: requires treesitter available at runtime; safe fallback if not | |
| vim.opt.foldmethod = "expr" -- use expression for folding | |
| vim.opt.foldexpr = "v:lua.vim.treesitter.foldexpr()" -- use treesitter for folding | |
| vim.opt.foldlevel = 99 -- start with all folds open | |
| vim.opt.splitbelow = true -- horizontal splits go below | |
| vim.opt.splitright = true -- vertical splits go right | |
| vim.opt.wildmenu = true -- tab completion | |
| vim.opt.wildmode = "longest:full,full" -- complete longest common match, full completion list, cycle through with Tab | |
| vim.opt.diffopt:append("linematch:60") -- improve diff display | |
| vim.opt.redrawtime = 10000 -- increase neovim redraw tolerance | |
| vim.opt.maxmempattern = 20000 -- increase max memory | |
| -- ============================================================================ | |
| -- KEYMAPS | |
| -- ============================================================================ | |
| vim.g.mapleader = " " -- space for leader | |
| vim.g.maplocalleader = " " -- space for localleader | |
| -- better movement in wrapped text | |
| vim.keymap.set("n", "j", function() | |
| return vim.v.count == 0 and "gj" or "j" -- gj | |
| end, { expr = true, silent = true, desc = "Down (wrap-aware)" }) | |
| vim.keymap.set("n", "k", function() | |
| return vim.v.count == 0 and "gk" or "k" -- gk | |
| end, { expr = true, silent = true, desc = "Up (wrap-aware)" }) | |
| vim.keymap.set("n", "<leader>c", ":nohlsearch<CR>", { desc = "Clear search highlights" }) -- CLEAR Search Highlight | |
| vim.keymap.set("n", "n", "nzzzv", { desc = "Next search result (centered)" }) -- First SEARCH then press n | |
| vim.keymap.set("n", "N", "Nzzzv", { desc = "Previous search result (centered)" }) -- First SEARCH then press N | |
| vim.keymap.set("n", "<C-d>", "<C-d>zz", { desc = "Half page down (centered)" }) -- Ctrl+d | |
| vim.keymap.set("n", "<C-u>", "<C-u>zz", { desc = "Half page up (centered)" }) -- Ctrl+u | |
| vim.keymap.set("x", "<leader>p", '"_dP', { desc = "Paste without yanking" }) -- SPACE+p | |
| vim.keymap.set({ "n", "v" }, "<leader>x", '"_d', { desc = "Delete without yanking" }) -- SPACE+x | |
| vim.keymap.set("n", "<leader>bn", ":bnext<CR>", { desc = "Next buffer" }) -- SPACE+bn | |
| vim.keymap.set("n", "<leader>bp", ":bprevious<CR>", { desc = "Previous buffer" }) -- SPACE+bp | |
| vim.keymap.set("n", "<A-j>", ":m .+1<CR>==", { desc = "Move line down" }) -- ALT+j | |
| vim.keymap.set("n", "<A-k>", ":m .-2<CR>==", { desc = "Move line up" }) -- ALT+k | |
| vim.keymap.set("v", "<A-j>", ":m '>+1<CR>gv=gv", { desc = "Move selection down" }) -- SELECT and ALT+j | |
| vim.keymap.set("v", "<A-k>", ":m '<-2<CR>gv=gv", { desc = "Move selection up" }) -- SELECT and ALT+k | |
| vim.keymap.set("v", "<", "<gv", { desc = "Indent left and reselect" }) -- Select + < | |
| vim.keymap.set("v", ">", ">gv", { desc = "Indent right and reselect" }) -- Select + > | |
| vim.keymap.set("n", "J", "mzJ`z", { desc = "Join lines and keep cursor position" }) -- J | |
| -- FILE PATH | |
| vim.keymap.set("n", "<leader>pa", function() -- show file path | |
| local path = vim.fn.expand("%:p") | |
| vim.fn.setreg("+", path) | |
| print("file:", path) | |
| end, { desc = "Copy full file path" }) | |
| vim.keymap.set("n", "<leader>rpa", function() -- show file path | |
| local path = vim.fn.expand("%:.") | |
| vim.fn.setreg("+", path) | |
| print("file:", path) | |
| end, { desc = "Copy relative file path" }) | |
| vim.keymap.set("n", "<leader>td", function() | |
| vim.diagnostic.enable(not vim.diagnostic.is_enabled()) | |
| end, { desc = "Toggle diagnostics" }) | |
| -- ============================================================================ | |
| -- AUTOCMDS | |
| -- ============================================================================ | |
| local augroup = vim.api.nvim_create_augroup("UserConfig", { clear = true }) | |
| -- highlight yanked text | |
| vim.api.nvim_create_autocmd("TextYankPost", { | |
| group = augroup, | |
| callback = function() | |
| vim.hl.on_yank() | |
| end, | |
| }) | |
| -- return to last cursor position | |
| vim.api.nvim_create_autocmd("BufReadPost", { | |
| group = augroup, | |
| desc = "Restore last cursor position", | |
| callback = function() | |
| if vim.o.diff then -- except in diff mode | |
| return | |
| end | |
| local last_pos = vim.api.nvim_buf_get_mark(0, '"') -- {line, col} | |
| local last_line = vim.api.nvim_buf_line_count(0) | |
| local row = last_pos[1] | |
| if row < 1 or row > last_line then | |
| return | |
| end | |
| pcall(vim.api.nvim_win_set_cursor, 0, last_pos) | |
| end, | |
| }) | |
| -- wrap, linebreak and spellcheck on markdown and text files | |
| vim.api.nvim_create_autocmd("FileType", { | |
| group = augroup, | |
| pattern = { "markdown", "text", "gitcommit" }, | |
| callback = function() | |
| vim.opt_local.wrap = true | |
| vim.opt_local.linebreak = true | |
| vim.opt_local.spell = true | |
| end, | |
| }) | |
| -- ============================================================================ | |
| -- PLUGINS (vim.pack) | |
| -- ============================================================================ | |
| -- TREE TOGGLE | |
| vim.keymap.set("n", "<leader>e", ":NvimTreeToggle<CR>", { noremap = true, silent = true }) | |
| -- FUZZY FIND | |
| vim.keymap.set("n", "<leader>ff", ":FzfLua files<CR>", { desc = "Find Files" }) | |
| vim.keymap.set("n", "<leader>fg", ":FzfLua live_grep<CR>", { desc = "FZF Live Grep" }) | |
| vim.keymap.set("n", "<leader>fb", ":FzfLua buffers<CR>", { desc = "FZF Buffers" }) | |
| vim.keymap.set("n", "<leader>fh", ":FzfLua help_tags<CR>", { desc = "FZF Help Tags" }) | |
| vim.keymap.set("n", "<leader>fx", ":FzfLua diagnostics_document<CR>", { desc = "FZF Diagnostics Document" }) | |
| vim.keymap.set("n", "<leader>fX", ":FzfLua diagnostics_workspace<CR>", { desc = "FZF Diagnostics Workspace" }) | |
| -- ============================================================================ | |
| -- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Installed (16) | |
| ✓ delve | |
| ✓ efm | |
| ✓ gofumpt | |
| ✓ golangci-lint | |
| ✓ gopls | |
| ✓ html-lsp html | |
| ✓ htmx-lsp htmx | |
| ✓ local-lua-debugger-vscode | |
| ✓ lua-language-server lua_ls | |
| ✓ marksman | |
| ✓ prettierd | |
| ✓ selene | |
| ✓ stylua | |
| ✓ tailwindcss-language-server tailwindcss | |
| ✓ templ | |
| ✓ yaml-language-server yamlls |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| return { | |
| -- Core dependencies | |
| -- https://github.com/nvim-lua/plenary.nvim | |
| { "nvim-lua/plenary.nvim", lazy = true }, | |
| -- https://github.com/nvim-tree/nvim-web-devicons | |
| -- { "nvim-tree/nvim-web-devicons", opts = {} }, | |
| -- Tree / Folder | |
| -- https://github.com/nvim-tree/nvim-tree.lua | |
| { | |
| "nvim-tree/nvim-tree.lua", | |
| version = "*", | |
| lazy = false, | |
| dependencies = { | |
| "nvim-tree/nvim-web-devicons", | |
| }, | |
| config = function() | |
| require("nvim-tree").setup({ | |
| view = { | |
| width = 35, | |
| }, | |
| filters = { | |
| dotfiles = false, | |
| }, | |
| renderer = { | |
| group_empty = true, | |
| }, | |
| git = { | |
| enable = true, | |
| ignore = false, | |
| }, | |
| }) | |
| end, | |
| }, | |
| -- FUZZY FINDER | |
| -- https://github.com/junegunn/fzf?tab=readme-ov-file#linux-packages -- FIRST install this in pc | |
| -- https://github.com/ibhagwan/fzf-lua | |
| { | |
| "ibhagwan/fzf-lua", | |
| dependencies = { "nvim-tree/nvim-web-devicons" }, | |
| opts = {}, | |
| }, | |
| -- 40+ Indepentednt modules | |
| -- https://github.com/nvim-mini/mini.nvim | |
| { | |
| "nvim-mini/mini.nvim", | |
| version = "*", | |
| config = function() | |
| require("mini.ai").setup({}) | |
| require("mini.comment").setup({}) -- gcc => Add comment this line | |
| require("mini.move").setup({}) | |
| require("mini.surround").setup({}) | |
| require("mini.cursorword").setup({}) | |
| require("mini.indentscope").setup({}) | |
| require("mini.pairs").setup({}) | |
| require("mini.trailspace").setup({}) | |
| require("mini.bufremove").setup({}) | |
| require("mini.notify").setup({}) | |
| require("mini.icons").setup({}) | |
| end, | |
| }, | |
| -- https://github.com/stevearc/conform.nvim | |
| { | |
| "stevearc/conform.nvim", | |
| event = { "BufWritePre" }, | |
| cmd = { "ConformInfo" }, | |
| opts = { | |
| formatters_by_ft = { | |
| lua = { "stylua" }, | |
| go = { "gofumpt", "goimports" }, | |
| templ = { "templ" }, | |
| markdown = { "prettierd", "marksman" }, | |
| yaml = { "prettierd" }, | |
| html = { "prettierd" }, | |
| css = { "prettierd" }, | |
| }, | |
| format_on_save = { | |
| timeout_ms = 500, | |
| lsp_format = "fallback", | |
| }, | |
| }, | |
| }, | |
| -- Treesitter | |
| -- https://github.com/nvim-treesitter/nvim-treesitter | |
| { "nvim-treesitter/nvim-treesitter", branch = "main", lazy = false, build = ":TSUpdate" }, | |
| -- https://github.com/nvim-lualine/lualine.nvim | |
| -- { | |
| -- "nvim-lualine/lualine.nvim", | |
| -- dependencies = { "nvim-tree/nvim-web-devicons" }, | |
| -- }, | |
| -- https://github.com/L3MON4D3/LuaSnip | |
| { | |
| "L3MON4D3/LuaSnip", | |
| -- follow latest release. | |
| version = "v2.*", -- Replace <CurrentMajor> by the latest released major (first number of latest release) | |
| -- install jsregexp (optional!). | |
| build = "make install_jsregexp", | |
| }, | |
| -- https://github.com/folke/which-key.nvim | |
| { | |
| "folke/which-key.nvim", | |
| event = "VeryLazy", | |
| opts = { | |
| -- your configuration comes here | |
| -- or leave it empty to use the default settings | |
| -- refer to the configuration section below | |
| }, | |
| keys = { | |
| { | |
| "<leader>?", | |
| function() | |
| require("which-key").show({ global = false }) | |
| end, | |
| desc = "Buffer Local Keymaps (which-key)", | |
| }, | |
| }, | |
| }, | |
| -- https://github.com/hrsh7th/nvim-cmp | |
| -- { "hrsh7th/nvim-cmp" }, | |
| -- { "hrsh7th/nvim-lspconfig" }, | |
| -- { "hrsh7th/cmp-nvim-lsp" }, | |
| -- { "hrsh7th/cmp-buffer" }, | |
| -- { "hrsh7th/cmp-path" }, | |
| -- { "hrsh7th/cmp-cmdline" }, | |
| -- { "saadparwaiz1/cmp_luasnip" }, -- For luasnip users. As per https://github.com/hrsh7th/nvim-cmp#setup | |
| -- LSP:: https://github.com/neovim/nvim-lspconfig | |
| { "neovim/nvim-lspconfig" }, | |
| -- MASON:: https://github.com/mason-org/mason.nvim | |
| { | |
| "mason-org/mason.nvim", | |
| opts = { | |
| ui = { | |
| icons = { | |
| package_installed = "✓", | |
| package_pending = "➜", | |
| package_uninstalled = "✗", | |
| }, | |
| }, | |
| }, | |
| }, | |
| -- https://github.com/mason-org/mason-lspconfig.nvim | |
| { | |
| "mason-org/mason-lspconfig.nvim", | |
| opts = { | |
| -- ensure_installed = { "lua_ls" }, | |
| }, | |
| dependencies = { { "mason-org/mason.nvim", opts = {} }, "neovim/nvim-lspconfig" }, | |
| }, | |
| -- https://github.com/saghen/blink.cmp | |
| -- https://cmp.saghen.dev/installation#lazy-nvim | |
| { | |
| "saghen/blink.cmp", | |
| dependencies = { "rafamadriz/friendly-snippets" }, | |
| version = "1.*", | |
| opts = { | |
| -- See :h blink-cmp-config-keymap for defining your own keymap | |
| keymap = { | |
| preset = "none", | |
| ["<CR>"] = { "accept", "fallback" }, | |
| ["<C-j>"] = { "select_next", "fallback" }, | |
| ["<C-k>"] = { "select_prev", "fallback" }, | |
| ["<Tab>"] = { "snippet_forward", "fallback" }, | |
| ["<S-Tab>"] = { "snippet_backward", "fallback" }, | |
| }, | |
| appearance = { | |
| nerd_font_variant = "mono", | |
| kind_icons = { | |
| Codeium = "", -- Custom icon for AI suggestions | |
| Windsurf = "", -- Or "" if you prefer a different AI spark | |
| }, | |
| }, | |
| completion = { documentation = { auto_show = true } }, | |
| fuzzy = { implementation = "prefer_rust_with_warning" }, | |
| -- cmdline = { | |
| -- keymap = { preset = "inherit" }, | |
| -- completion = { menu = { auto_show = true } }, | |
| -- }, | |
| sources = { | |
| default = { "lsp", "path", "snippets", "buffer", "windsurf" }, | |
| providers = { | |
| windsurf = { | |
| name = "Windsurf", | |
| module = "codeium.blink", | |
| score_offset = 100, | |
| async = true, | |
| transform_items = function(_, items) | |
| for _, item in ipairs(items) do | |
| item.kind_icon = "" | |
| item.kind_name = "Windsurf" -- This maps to your icon key | |
| end | |
| return items | |
| end, | |
| }, | |
| }, | |
| }, | |
| }, | |
| }, | |
| -- | |
| -- GIT | |
| -- https://github.com/tpope/vim-fugitive | |
| { | |
| "tpope/vim-fugitive", | |
| }, | |
| -- https://github.com/lewis6991/gitsigns.nvim | |
| { | |
| "lewis6991/gitsigns.nvim", | |
| }, | |
| -- | |
| -- AI | |
| -- https://github.com/Exafunction/windsurf.vim | |
| { | |
| "Exafunction/windsurf.nvim", | |
| dependencies = { | |
| "nvim-lua/plenary.nvim", | |
| "hrsh7th/nvim-cmp", | |
| }, | |
| config = function() | |
| require("codeium").setup({ | |
| virtual_text = { enabled = true }, -- Turn this off if using blink | |
| }) | |
| end, | |
| }, | |
| {}, | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| :checkhealth nvim-treesitter | |
| Installed languages H L F I J | |
| 26 - bash ✓ ✓ ✓ ✓ ✓ | |
| 27 - css ✓ . ✓ ✓ ✓ | |
| 28 - dockerfile ✓ . . . ✓ | |
| 29 - ecma | |
| 30 - go ✓ ✓ ✓ ✓ ✓ | |
| 31 - html ✓ ✓ ✓ ✓ ✓ | |
| 32 - html_tags | |
| 33 - javascript ✓ ✓ ✓ ✓ ✓ | |
| 34 - json ✓ ✓ ✓ ✓ ✓ | |
| 35 - jsx | |
| 36 - lua ✓ ✓ ✓ ✓ ✓ | |
| 37 - markdown ✓ . ✓ ✓ ✓ | |
| 38 - markdown_inline ✓ . . . ✓ | |
| 39 - templ ✓ . ✓ . ✓ | |
| 40 - tmux ✓ . . . ✓ | |
| 41 - typescript ✓ ✓ ✓ ✓ ✓ | |
| 42 - yaml ✓ ✓ ✓ ✓ ✓ | |
| 43 | |
| 44 Legend: [H]ighlights, [L]ocals, [F]olds, [I]ndents, In[J]ections |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment