From 54db1b62f9a5a3b0b4eb1d95a36868b23efd3489 Mon Sep 17 00:00:00 2001 From: poslop Date: Fri, 6 Feb 2026 07:50:23 -0600 Subject: [PATCH 01/15] convert to custom --- lua/config/lazy.lua | 35 +++++++++++++++++++++++++++++++++++ lua/map.lua | 0 lua/plugins/nvim-tree.lua | 6 ++++++ 3 files changed, 41 insertions(+) create mode 100644 lua/config/lazy.lua create mode 100644 lua/map.lua create mode 100644 lua/plugins/nvim-tree.lua diff --git a/lua/config/lazy.lua b/lua/config/lazy.lua new file mode 100644 index 0000000..f5ee74c --- /dev/null +++ b/lua/config/lazy.lua @@ -0,0 +1,35 @@ +-- 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 }, +}) diff --git a/lua/map.lua b/lua/map.lua new file mode 100644 index 0000000..e69de29 diff --git a/lua/plugins/nvim-tree.lua b/lua/plugins/nvim-tree.lua new file mode 100644 index 0000000..c436e8f --- /dev/null +++ b/lua/plugins/nvim-tree.lua @@ -0,0 +1,6 @@ +return { + { + "nvim-tree/nvim-tree.lua", + cmd = { "NvimTreeToggle", "NvimTreeFocus" }, + } +} -- 2.49.1 From e1a0c21a6ec5d100582a67ce16306019588174b2 Mon Sep 17 00:00:00 2001 From: poslop Date: Fri, 6 Feb 2026 09:22:25 -0600 Subject: [PATCH 02/15] base --- .stylua.toml | 2 +- LICENSE | 24 -------------------- README.md | 13 ----------- init.lua | 38 +------------------------------ lua/autocmds.lua | 1 - lua/chadrc.lua | 24 -------------------- lua/configs/conform.lua | 15 ------------- lua/configs/lazy.lua | 47 --------------------------------------- lua/configs/lspconfig.lua | 6 ----- lua/mappings.lua | 10 --------- lua/options.lua | 6 ----- lua/plugins/conform.lua | 6 ----- lua/plugins/lsp.lua | 8 ------- lua/plugins/markdown.lua | 6 ++--- lua/plugins/mason.lua | 17 -------------- 15 files changed, 5 insertions(+), 218 deletions(-) delete mode 100644 LICENSE delete mode 100644 README.md delete mode 100644 lua/autocmds.lua delete mode 100644 lua/chadrc.lua delete mode 100644 lua/configs/conform.lua delete mode 100644 lua/configs/lazy.lua delete mode 100644 lua/configs/lspconfig.lua delete mode 100644 lua/mappings.lua delete mode 100644 lua/options.lua delete mode 100644 lua/plugins/conform.lua delete mode 100644 lua/plugins/lsp.lua delete mode 100644 lua/plugins/mason.lua diff --git a/.stylua.toml b/.stylua.toml index ca1541c..ecb6dca 100644 --- a/.stylua.toml +++ b/.stylua.toml @@ -1,6 +1,6 @@ column_width = 120 line_endings = "Unix" indent_type = "Spaces" -indent_width = 4 +indent_width = 2 quote_style = "AutoPreferDouble" call_parentheses = "None" diff --git a/LICENSE b/LICENSE deleted file mode 100644 index fdddb29..0000000 --- a/LICENSE +++ /dev/null @@ -1,24 +0,0 @@ -This is free and unencumbered software released into the public domain. - -Anyone is free to copy, modify, publish, use, compile, sell, or -distribute this software, either in source code form or as a compiled -binary, for any purpose, commercial or non-commercial, and by any -means. - -In jurisdictions that recognize copyright laws, the author or authors -of this software dedicate any and all copyright interest in the -software to the public domain. We make this dedication for the benefit -of the public at large and to the detriment of our heirs and -successors. We intend this dedication to be an overt act of -relinquishment in perpetuity of all present and future rights to this -software under copyright law. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR -OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - -For more information, please refer to diff --git a/README.md b/README.md deleted file mode 100644 index f988418..0000000 --- a/README.md +++ /dev/null @@ -1,13 +0,0 @@ -## Install -``` -git clone https://git.archfox.org/poslop/nvbad ~/.config/nvim && nvim -``` -**This repo is supposed to be used as config by NvChad users!** - -- The main nvchad repo (NvChad/NvChad) is used as a plugin by this repo. -- So you just import its modules , like `require "nvchad.options" , require "nvchad.mappings"` -- So you can delete the .git from this repo ( when you clone it locally ) or fork it :) - -# Credits - -1) Lazyvim starter https://github.com/LazyVim/starter as nvchad's starter was inspired by Lazyvim's . It made a lot of things easier! diff --git a/init.lua b/init.lua index e861b68..55b8979 100644 --- a/init.lua +++ b/init.lua @@ -1,37 +1 @@ -vim.g.base46_cache = vim.fn.stdpath "data" .. "/base46/" -vim.g.mapleader = " " - --- bootstrap lazy and all plugins -local lazypath = vim.fn.stdpath "data" .. "/lazy/lazy.nvim" - -if not vim.uv.fs_stat(lazypath) then - local repo = "https://github.com/folke/lazy.nvim.git" - vim.fn.system { "git", "clone", "--filter=blob:none", repo, "--branch=stable", lazypath } -end - -vim.opt.rtp:prepend(lazypath) - -local lazy_config = require "configs.lazy" - --- load plugins -require("lazy").setup({ - { - "NvChad/NvChad", - lazy = false, - branch = "v2.5", - import = "nvchad.plugins", - }, - - { import = "plugins" }, -}, lazy_config) - --- load theme -dofile(vim.g.base46_cache .. "defaults") -dofile(vim.g.base46_cache .. "statusline") - -require "options" -require "autocmds" - -vim.schedule(function() - require "mappings" -end) +require("config.lazy") diff --git a/lua/autocmds.lua b/lua/autocmds.lua deleted file mode 100644 index d2db0bb..0000000 --- a/lua/autocmds.lua +++ /dev/null @@ -1 +0,0 @@ -require "nvchad.autocmds" diff --git a/lua/chadrc.lua b/lua/chadrc.lua deleted file mode 100644 index 9eca87c..0000000 --- a/lua/chadrc.lua +++ /dev/null @@ -1,24 +0,0 @@ --- This file needs to have same structure as nvconfig.lua --- https://github.com/NvChad/ui/blob/v3.0/lua/nvconfig.lua --- Please read that file to know all available options :( - ----@type ChadrcConfig -local M = {} - -M.base46 = { - theme = "onedark", - - -- hl_override = { - -- Comment = { italic = true }, - -- ["@comment"] = { italic = true }, - -- }, -} - --- M.nvdash = { load_on_startup = true } --- M.ui = { --- tabufline = { --- lazyload = false --- } --- } - -return M diff --git a/lua/configs/conform.lua b/lua/configs/conform.lua deleted file mode 100644 index 35ba6cf..0000000 --- a/lua/configs/conform.lua +++ /dev/null @@ -1,15 +0,0 @@ -local options = { - formatters_by_ft = { - lua = { "stylua" }, - -- css = { "prettier" }, - -- html = { "prettier" }, - }, - - -- format_on_save = { - -- -- These options will be passed to conform.format() - -- timeout_ms = 500, - -- lsp_fallback = true, - -- }, -} - -return options diff --git a/lua/configs/lazy.lua b/lua/configs/lazy.lua deleted file mode 100644 index cd170bd..0000000 --- a/lua/configs/lazy.lua +++ /dev/null @@ -1,47 +0,0 @@ -return { - defaults = { lazy = true }, - install = { colorscheme = { "nvchad" } }, - - ui = { - icons = { - ft = "", - lazy = "󰂠 ", - loaded = "", - not_loaded = "", - }, - }, - - performance = { - rtp = { - disabled_plugins = { - "2html_plugin", - "tohtml", - "getscript", - "getscriptPlugin", - "gzip", - "logipat", - "netrw", - "netrwPlugin", - "netrwSettings", - "netrwFileHandlers", - "matchit", - "tar", - "tarPlugin", - "rrhelper", - "spellfile_plugin", - "vimball", - "vimballPlugin", - "zip", - "zipPlugin", - "tutor", - "rplugin", - "syntax", - "synmenu", - "optwin", - "compiler", - "bugreport", - "ftplugin", - }, - }, - }, -} diff --git a/lua/configs/lspconfig.lua b/lua/configs/lspconfig.lua deleted file mode 100644 index 40c6172..0000000 --- a/lua/configs/lspconfig.lua +++ /dev/null @@ -1,6 +0,0 @@ -require("nvchad.configs.lspconfig").defaults() - --- local servers = { "phpactor" } --- vim.lsp.enable(servers) - --- read :h vim.lsp.config for changing options of lsp servers diff --git a/lua/mappings.lua b/lua/mappings.lua deleted file mode 100644 index 783b78f..0000000 --- a/lua/mappings.lua +++ /dev/null @@ -1,10 +0,0 @@ -require "nvchad.mappings" - --- add yours here - -local map = vim.keymap.set - -map("n", ";", ":", { desc = "CMD enter command mode" }) -map("i", "jk", "") - --- map({ "n", "i", "v" }, "", " w ") diff --git a/lua/options.lua b/lua/options.lua deleted file mode 100644 index 738f20b..0000000 --- a/lua/options.lua +++ /dev/null @@ -1,6 +0,0 @@ -require "nvchad.options" - --- add yours here! - --- local o = vim.o --- o.cursorlineopt ='both' -- to enable cursorline! diff --git a/lua/plugins/conform.lua b/lua/plugins/conform.lua deleted file mode 100644 index 5419cd3..0000000 --- a/lua/plugins/conform.lua +++ /dev/null @@ -1,6 +0,0 @@ -return { - { - "stevearc/conform.nvim", - opts = require "configs.conform", - } -} diff --git a/lua/plugins/lsp.lua b/lua/plugins/lsp.lua deleted file mode 100644 index 2073196..0000000 --- a/lua/plugins/lsp.lua +++ /dev/null @@ -1,8 +0,0 @@ -return { - { - "neovim/nvim-lspconfig", - config = function() - require "configs.lspconfig" - end, - } -} diff --git a/lua/plugins/markdown.lua b/lua/plugins/markdown.lua index ad22932..c0a37bf 100644 --- a/lua/plugins/markdown.lua +++ b/lua/plugins/markdown.lua @@ -1,5 +1,5 @@ return { - { - "iamcco/markdown-preview.nvim" - } + { + "iamcco/markdown-preview.nvim" + } } diff --git a/lua/plugins/mason.lua b/lua/plugins/mason.lua deleted file mode 100644 index 167ac9f..0000000 --- a/lua/plugins/mason.lua +++ /dev/null @@ -1,17 +0,0 @@ -return { - { - "williamboman/mason-lspconfig.nvim", - event = { "BufReadPre", "BufNewFile" }, - dependencies = { - "mason-org/mason.nvim", - "neovim/nvim-lspconfig", - }, - opts = { - ensure_installed = { - "phpactor", - "lua_ls", - "nil_ls" - } - } - } -} -- 2.49.1 From 4126124208c20047501b051dd051e0de2d2a7824 Mon Sep 17 00:00:00 2001 From: poslop Date: Fri, 6 Feb 2026 13:38:25 -0600 Subject: [PATCH 03/15] idr --- lua/config/lazy.lua | 20 +++++++++----------- lua/config/maps.lua | 3 +++ lua/config/opts.lua | 7 +++++++ lua/map.lua | 0 lua/plugins/format.lua | 15 +++++++++++++++ lua/plugins/nvim-tree.lua | 13 +++++++++---- lua/plugins/theme.lua | 13 +++++++++++++ lua/plugins/which.lua | 15 +++++++++++++++ 8 files changed, 71 insertions(+), 15 deletions(-) create mode 100644 lua/config/maps.lua create mode 100644 lua/config/opts.lua delete mode 100644 lua/map.lua create mode 100644 lua/plugins/format.lua create mode 100644 lua/plugins/theme.lua create mode 100644 lua/plugins/which.lua diff --git a/lua/config/lazy.lua b/lua/config/lazy.lua index f5ee74c..d7c046b 100644 --- a/lua/config/lazy.lua +++ b/lua/config/lazy.lua @@ -1,4 +1,3 @@ --- 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" @@ -15,21 +14,20 @@ if not (vim.uv or vim.loop).fs_stat(lazypath) then 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 = "\\" +vim.g.maplocalleader = " " + +require("config.maps") +require("config.opts") --- 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 + install = { colorscheme = { "tokyonight" } }, checker = { enabled = true }, }) + +vim.cmd[[colorscheme tokyonight]] + +require("bufferline").setup{} diff --git a/lua/config/maps.lua b/lua/config/maps.lua new file mode 100644 index 0000000..8648125 --- /dev/null +++ b/lua/config/maps.lua @@ -0,0 +1,3 @@ +local map = vim.keymap.set + +map("n", "e", "NvimTreeToggle", { desc = "NvimTree" }) diff --git a/lua/config/opts.lua b/lua/config/opts.lua new file mode 100644 index 0000000..a76c6c4 --- /dev/null +++ b/lua/config/opts.lua @@ -0,0 +1,7 @@ +vim.opt.termguicolors = true + +vim.opt.expandtab = true +vim.opt.shiftwidth = 2 +vim.opt.tabstop = 2 +vim.opt.smartindent = true +vim.opt.autoindent = true diff --git a/lua/map.lua b/lua/map.lua deleted file mode 100644 index e69de29..0000000 diff --git a/lua/plugins/format.lua b/lua/plugins/format.lua new file mode 100644 index 0000000..d3babb6 --- /dev/null +++ b/lua/plugins/format.lua @@ -0,0 +1,15 @@ +return { +{ + 'windwp/nvim-autopairs', + event = "InsertEnter", + config = true +}, +{ + "folke/ts-comments.nvim", + event = "VeryLazy", + opts = {}, +}, + { + "hrsh7th/nvim-cmp", + } +} diff --git a/lua/plugins/nvim-tree.lua b/lua/plugins/nvim-tree.lua index c436e8f..93604bb 100644 --- a/lua/plugins/nvim-tree.lua +++ b/lua/plugins/nvim-tree.lua @@ -1,6 +1,11 @@ return { - { - "nvim-tree/nvim-tree.lua", - cmd = { "NvimTreeToggle", "NvimTreeFocus" }, - } + "nvim-tree/nvim-tree.lua", + version = "*", + lazy = false, + dependencies = { + "nvim-tree/nvim-web-devicons", + }, + config = function() + require("nvim-tree").setup {} + end, } diff --git a/lua/plugins/theme.lua b/lua/plugins/theme.lua new file mode 100644 index 0000000..d09388c --- /dev/null +++ b/lua/plugins/theme.lua @@ -0,0 +1,13 @@ +return { + { + "folke/tokyonight.nvim", + lazy = false, + priority = 1000, + opts = {}, + }, + { + 'akinsho/bufferline.nvim', + version = "*", + dependencies = 'nvim-tree/nvim-web-devicons' + } +} diff --git a/lua/plugins/which.lua b/lua/plugins/which.lua new file mode 100644 index 0000000..08c5841 --- /dev/null +++ b/lua/plugins/which.lua @@ -0,0 +1,15 @@ +return { + { + "folke/which-key.nvim", + event = "VeryLazy", + keys = { + { + "?", + function() + require("which-key").show({ global = false }) + end, + desc = "Buffer Local Keymaps (which-key)", + }, + }, + } +} -- 2.49.1 From 9499cc8072b41df2200095ea64a369858f783a0c Mon Sep 17 00:00:00 2001 From: poslop Date: Fri, 6 Feb 2026 14:29:42 -0600 Subject: [PATCH 04/15] luaformat --- lua/config/maps.lua | 4 ++++ lua/plugins/format.lua | 31 ++++++++++++++++++++++++------- readme.md | 7 +++++++ 3 files changed, 35 insertions(+), 7 deletions(-) create mode 100644 readme.md diff --git a/lua/config/maps.lua b/lua/config/maps.lua index 8648125..2647cf4 100644 --- a/lua/config/maps.lua +++ b/lua/config/maps.lua @@ -1,3 +1,7 @@ local map = vim.keymap.set map("n", "e", "NvimTreeToggle", { desc = "NvimTree" }) + +map("n", "f", function() + require("conform").format { async = true } +end, { desc = "Format buffer" }) diff --git a/lua/plugins/format.lua b/lua/plugins/format.lua index d3babb6..8868a03 100644 --- a/lua/plugins/format.lua +++ b/lua/plugins/format.lua @@ -1,15 +1,32 @@ return { -{ + { 'windwp/nvim-autopairs', event = "InsertEnter", config = true -}, -{ - "folke/ts-comments.nvim", - event = "VeryLazy", - opts = {}, -}, + }, + { + "folke/ts-comments.nvim", + event = "VeryLazy", + opts = {}, + }, { "hrsh7th/nvim-cmp", + }, + { + 'stevearc/conform.nvim', + opts = { + formatters_by_ft = { + lua = { "stylua" }, + }, + default_format_opts = { + lsp_format = "fallback", + }, + format_on_save = { timeout_ms = 500 }, + formatters = { + shfmt = { + append_args = { "-i", "2" }, + }, + }, + }, } } diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..e03cff0 --- /dev/null +++ b/readme.md @@ -0,0 +1,7 @@ +### Dependencies + +Formatters + +``` +stylua +``` -- 2.49.1 From 2a63e1d8ef27e6ac7994a4f7f39fa699c90bfa43 Mon Sep 17 00:00:00 2001 From: poslop Date: Fri, 6 Feb 2026 15:45:54 -0600 Subject: [PATCH 05/15] terminal --- lua/config/maps.lua | 17 +++++++++++++++++ lua/plugins/nvim-tree.lua | 11 ----------- 2 files changed, 17 insertions(+), 11 deletions(-) delete mode 100644 lua/plugins/nvim-tree.lua diff --git a/lua/config/maps.lua b/lua/config/maps.lua index 2647cf4..50288e1 100644 --- a/lua/config/maps.lua +++ b/lua/config/maps.lua @@ -5,3 +5,20 @@ map("n", "e", "NvimTreeToggle", { desc = "NvimTree" }) map("n", "f", function() require("conform").format { async = true } end, { desc = "Format buffer" }) + +map("n", "", "h", { desc = "switch window left" }) +map("n", "", "l", { desc = "switch window right" }) +map("n", "", "j", { desc = "switch window down" }) +map("n", "", "k", { desc = "switch window up" }) + +map("n", "", "noh", { desc = "general clear highlights" }) + +map("n", "n", "set nu!", { desc = "toggle line number" }) + +map("n", "/", "gcc", { desc = "toggle comment", remap = true }) +map("v", "/", "gc", { desc = "toggle comment", remap = true }) + +map("t", "", "", { desc = "terminal escape terminal mode" }) + +map("n", "th", "ToggleTerm direction=horizontal", { desc = "ToggleTerm: horizontal" }) +map("n", "tf", "ToggleTerm direction=float", { desc = "ToggleTerm: float" }) diff --git a/lua/plugins/nvim-tree.lua b/lua/plugins/nvim-tree.lua deleted file mode 100644 index 93604bb..0000000 --- a/lua/plugins/nvim-tree.lua +++ /dev/null @@ -1,11 +0,0 @@ -return { - "nvim-tree/nvim-tree.lua", - version = "*", - lazy = false, - dependencies = { - "nvim-tree/nvim-web-devicons", - }, - config = function() - require("nvim-tree").setup {} - end, -} -- 2.49.1 From bb5185eac437701c43f085c64026b1b959853567 Mon Sep 17 00:00:00 2001 From: poslop Date: Fri, 6 Feb 2026 16:16:56 -0600 Subject: [PATCH 06/15] buffer mappings --- lua/config/maps.lua | 5 +++++ lua/plugins/theme.lua | 17 ++++++----------- lua/plugins/windows.lua | 24 ++++++++++++++++++++++++ 3 files changed, 35 insertions(+), 11 deletions(-) create mode 100644 lua/plugins/windows.lua diff --git a/lua/config/maps.lua b/lua/config/maps.lua index 50288e1..8142a09 100644 --- a/lua/config/maps.lua +++ b/lua/config/maps.lua @@ -22,3 +22,8 @@ map("t", "", "", { desc = "terminal escape terminal mode" }) map("n", "th", "ToggleTerm direction=horizontal", { desc = "ToggleTerm: horizontal" }) map("n", "tf", "ToggleTerm direction=float", { desc = "ToggleTerm: float" }) + +map("n", "", "BufferLineCycleNext", { desc = "Next buffer" }) +map("n", "", "BufferLineCyclePrev", { desc = "Previous buffer" }) +map("n", "ba", "BufferLineCloseOthers", { desc = "Close other buffers" }) +map("n", "x", "bdelete", { desc = "Close buffer" }) diff --git a/lua/plugins/theme.lua b/lua/plugins/theme.lua index d09388c..d18dd13 100644 --- a/lua/plugins/theme.lua +++ b/lua/plugins/theme.lua @@ -1,13 +1,8 @@ return { - { - "folke/tokyonight.nvim", - lazy = false, - priority = 1000, - opts = {}, - }, - { - 'akinsho/bufferline.nvim', - version = "*", - dependencies = 'nvim-tree/nvim-web-devicons' - } + { + "folke/tokyonight.nvim", + lazy = false, + priority = 1000, + opts = {}, + }, } diff --git a/lua/plugins/windows.lua b/lua/plugins/windows.lua new file mode 100644 index 0000000..6e99ad0 --- /dev/null +++ b/lua/plugins/windows.lua @@ -0,0 +1,24 @@ +return { + { + "nvim-tree/nvim-tree.lua", + version = "*", + lazy = false, + dependencies = { + "nvim-tree/nvim-web-devicons", + }, + config = function() + require("nvim-tree").setup {} + end, + }, + + { + "akinsho/toggleterm.nvim", + version = "*", + opts = {}, + }, + { + "akinsho/bufferline.nvim", + version = "*", + dependencies = "nvim-tree/nvim-web-devicons", + }, +} -- 2.49.1 From 5238f24acf517090da09336e3201ebc10a7d560f Mon Sep 17 00:00:00 2001 From: poslop Date: Mon, 9 Feb 2026 09:41:09 -0600 Subject: [PATCH 07/15] stylua --- init.lua | 2 +- lua/config/lazy.lua | 16 ++++++++-------- lua/plugins/format.lua | 28 ++++++++++++++-------------- lua/plugins/markdown.lua | 6 +++--- lua/plugins/which.lua | 6 +++--- 5 files changed, 29 insertions(+), 29 deletions(-) diff --git a/init.lua b/init.lua index 55b8979..727cc08 100644 --- a/init.lua +++ b/init.lua @@ -1 +1 @@ -require("config.lazy") +require "config.lazy" diff --git a/lua/config/lazy.lua b/lua/config/lazy.lua index d7c046b..d0adb76 100644 --- a/lua/config/lazy.lua +++ b/lua/config/lazy.lua @@ -1,7 +1,7 @@ -local lazypath = vim.fn.stdpath("data") .. "/lazy/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 }) + 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" }, @@ -17,17 +17,17 @@ vim.opt.rtp:prepend(lazypath) vim.g.mapleader = " " vim.g.maplocalleader = " " -require("config.maps") -require("config.opts") +require "config.maps" +require "config.opts" -require("lazy").setup({ +require("lazy").setup { spec = { { import = "plugins" }, }, install = { colorscheme = { "tokyonight" } }, checker = { enabled = true }, -}) +} -vim.cmd[[colorscheme tokyonight]] +vim.cmd [[colorscheme tokyonight]] -require("bufferline").setup{} +require("bufferline").setup {} diff --git a/lua/plugins/format.lua b/lua/plugins/format.lua index 8868a03..36c8d9e 100644 --- a/lua/plugins/format.lua +++ b/lua/plugins/format.lua @@ -1,8 +1,8 @@ return { { - 'windwp/nvim-autopairs', + "windwp/nvim-autopairs", event = "InsertEnter", - config = true + config = true, }, { "folke/ts-comments.nvim", @@ -13,20 +13,20 @@ return { "hrsh7th/nvim-cmp", }, { - 'stevearc/conform.nvim', + "stevearc/conform.nvim", opts = { - formatters_by_ft = { - lua = { "stylua" }, - }, - default_format_opts = { - lsp_format = "fallback", - }, - format_on_save = { timeout_ms = 500 }, - formatters = { - shfmt = { - append_args = { "-i", "2" }, + formatters_by_ft = { + lua = { "stylua" }, + }, + default_format_opts = { + lsp_format = "fallback", + }, + format_on_save = { timeout_ms = 500 }, + formatters = { + shfmt = { + append_args = { "-i", "2" }, + }, }, }, }, - } } diff --git a/lua/plugins/markdown.lua b/lua/plugins/markdown.lua index c0a37bf..1057e1d 100644 --- a/lua/plugins/markdown.lua +++ b/lua/plugins/markdown.lua @@ -1,5 +1,5 @@ return { - { - "iamcco/markdown-preview.nvim" - } + { + "iamcco/markdown-preview.nvim", + }, } diff --git a/lua/plugins/which.lua b/lua/plugins/which.lua index 08c5841..6d0cadb 100644 --- a/lua/plugins/which.lua +++ b/lua/plugins/which.lua @@ -1,15 +1,15 @@ return { - { + { "folke/which-key.nvim", event = "VeryLazy", keys = { { "?", function() - require("which-key").show({ global = false }) + require("which-key").show { global = false } end, desc = "Buffer Local Keymaps (which-key)", }, }, - } + }, } -- 2.49.1 From fd3266912a74bbf514097c9ce5126be249018005 Mon Sep 17 00:00:00 2001 From: poslop Date: Mon, 9 Feb 2026 09:44:37 -0600 Subject: [PATCH 08/15] bufferline binds --- lua/config/maps.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/config/maps.lua b/lua/config/maps.lua index 8142a09..7967789 100644 --- a/lua/config/maps.lua +++ b/lua/config/maps.lua @@ -26,4 +26,5 @@ map("n", "tf", "ToggleTerm direction=float", { desc = "ToggleTe map("n", "", "BufferLineCycleNext", { desc = "Next buffer" }) map("n", "", "BufferLineCyclePrev", { desc = "Previous buffer" }) map("n", "ba", "BufferLineCloseOthers", { desc = "Close other buffers" }) -map("n", "x", "bdelete", { desc = "Close buffer" }) +map("n", "x", "BufferLinePickClose", { desc = "Close buffer" }) +map("n", "bc", "BufferLinePick", { desc = "Close buffer" }) -- 2.49.1 From bf77f1563b32835d8afd37246e1df584f5e2277f Mon Sep 17 00:00:00 2001 From: poslop Date: Mon, 9 Feb 2026 09:48:46 -0600 Subject: [PATCH 09/15] treesitter --- lua/plugins/syntax.lua | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 lua/plugins/syntax.lua diff --git a/lua/plugins/syntax.lua b/lua/plugins/syntax.lua new file mode 100644 index 0000000..a00d33e --- /dev/null +++ b/lua/plugins/syntax.lua @@ -0,0 +1,27 @@ +return { + { + "nvim-treesitter/nvim-treesitter", + indent = { enable = true }, + highlight = { enable = true }, + folds = { enable = true }, + ensure_installed = { + "bash", + "diff", + "html", + "json", + "jsonc", + "lua", + "luadoc", + "luap", + "markdown", + "markdown_inline", + "printf", + "regex", + "toml", + "vim", + "vimdoc", + "xml", + "yaml", + }, + }, +} -- 2.49.1 From 73dfaec988f8c985be5ac7b0f592659086bb1536 Mon Sep 17 00:00:00 2001 From: poslop Date: Mon, 9 Feb 2026 10:49:50 -0600 Subject: [PATCH 10/15] clip and ts --- lua/config/opts.lua | 2 ++ lua/plugins/syntax.lua | 52 +++++++++++++++++++++++++----------------- 2 files changed, 33 insertions(+), 21 deletions(-) diff --git a/lua/config/opts.lua b/lua/config/opts.lua index a76c6c4..31487ef 100644 --- a/lua/config/opts.lua +++ b/lua/config/opts.lua @@ -1,3 +1,5 @@ +vim.opt.clipboard = "unnamedplus" + vim.opt.termguicolors = true vim.opt.expandtab = true diff --git a/lua/plugins/syntax.lua b/lua/plugins/syntax.lua index a00d33e..9840f9f 100644 --- a/lua/plugins/syntax.lua +++ b/lua/plugins/syntax.lua @@ -1,27 +1,37 @@ return { { "nvim-treesitter/nvim-treesitter", - indent = { enable = true }, - highlight = { enable = true }, - folds = { enable = true }, - ensure_installed = { - "bash", - "diff", - "html", - "json", - "jsonc", - "lua", - "luadoc", - "luap", - "markdown", - "markdown_inline", - "printf", - "regex", - "toml", - "vim", - "vimdoc", - "xml", - "yaml", + lazy = false, + build = ":TSUpdate", + opts = { + indent = { enable = true }, + highlight = { enable = true }, + folds = { enable = true }, + ensure_installed = { + "bash", + "diff", + "html", + "json", + "lua", + "luadoc", + "luap", + "markdown", + "markdown_inline", + "printf", + "regex", + "toml", + "vim", + "vimdoc", + "xml", + "yaml", + }, }, + config = function(_, opts) + local ts = require "nvim-treesitter" + + if type(opts.ensure_installed) == "table" and #opts.ensure_installed > 0 then + ts.install(opts.ensure_installed) + end + end, }, } -- 2.49.1 From 3f2c2ce65f129c046bdfc9c3b1a1a30aaddb49ce Mon Sep 17 00:00:00 2001 From: poslop Date: Mon, 9 Feb 2026 10:59:05 -0600 Subject: [PATCH 11/15] ts objects --- lua/plugins/syntax.lua | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/lua/plugins/syntax.lua b/lua/plugins/syntax.lua index 9840f9f..4f1d59e 100644 --- a/lua/plugins/syntax.lua +++ b/lua/plugins/syntax.lua @@ -34,4 +34,20 @@ return { end end, }, + + { + "nvim-treesitter/nvim-treesitter-textobjects", + opts = { + move = { + enable = true, + set_jumps = true, + keys = { + goto_next_start = { ["]f"] = "@function.outer", ["]c"] = "@class.outer", ["]a"] = "@parameter.inner" }, + goto_next_end = { ["]F"] = "@function.outer", ["]C"] = "@class.outer", ["]A"] = "@parameter.inner" }, + goto_previous_start = { ["[f"] = "@function.outer", ["[c"] = "@class.outer", ["[a"] = "@parameter.inner" }, + goto_previous_end = { ["[F"] = "@function.outer", ["[C"] = "@class.outer", ["[A"] = "@parameter.inner" }, + }, + }, + }, + }, } -- 2.49.1 From d0e94ed5a702344a5ef3fa6dccb7520d09307233 Mon Sep 17 00:00:00 2001 From: poslop Date: Mon, 9 Feb 2026 12:58:05 -0600 Subject: [PATCH 12/15] lsp lua --- lua/config/maps.lua | 30 +++++++++++++++++++++++ lua/plugins/lsp.lua | 58 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 88 insertions(+) create mode 100644 lua/plugins/lsp.lua diff --git a/lua/config/maps.lua b/lua/config/maps.lua index 7967789..b41c81f 100644 --- a/lua/config/maps.lua +++ b/lua/config/maps.lua @@ -28,3 +28,33 @@ map("n", "", "BufferLineCyclePrev", { desc = "Previous buffer" } map("n", "ba", "BufferLineCloseOthers", { desc = "Close other buffers" }) map("n", "x", "BufferLinePickClose", { desc = "Close buffer" }) map("n", "bc", "BufferLinePick", { desc = "Close buffer" }) + +vim.api.nvim_create_autocmd("LspAttach", { + callback = function(ev) + local bufnr = ev.buf + + local opts = function(desc) + return { buffer = bufnr, silent = true, desc = desc } + end + + map("n", "gd", vim.lsp.buf.definition, opts "LSP: Go to definition") + map("n", "gD", vim.lsp.buf.declaration, opts "LSP: Go to declaration") + map("n", "gi", vim.lsp.buf.implementation, opts "LSP: Go to implementation") + map("n", "gr", vim.lsp.buf.references, opts "LSP: References") + map("n", "K", vim.lsp.buf.hover, opts "LSP: Hover") + map("n", "rn", vim.lsp.buf.rename, opts "LSP: Rename") + map("n", "ca", vim.lsp.buf.code_action, opts "LSP: Code action") + + map("n", "[d", function() + vim.diagnostic.jump { count = -1, float = true } + end, opts "Diag: Prev") + map("n", "]d", function() + vim.diagnostic.jump { count = 1, float = true } + end, opts "Diag: Next") + map("n", "dd", vim.diagnostic.open_float, opts "Diag: Line diagnostics") + + map("n", "lf", function() + vim.lsp.buf.format { async = true } + end, opts "LSP: Format (server)") + end, +}) diff --git a/lua/plugins/lsp.lua b/lua/plugins/lsp.lua new file mode 100644 index 0000000..4061dfd --- /dev/null +++ b/lua/plugins/lsp.lua @@ -0,0 +1,58 @@ +return { + { + "hrsh7th/nvim-cmp", + dependencies = { + "hrsh7th/cmp-nvim-lsp", + "L3MON4D3/LuaSnip", + }, + config = function() + local cmp = require "cmp" + cmp.setup { + snippet = { + expand = function(args) + require("luasnip").lsp_expand(args.body) + end, + }, + mapping = cmp.mapping.preset.insert { + [""] = cmp.mapping.confirm { select = true }, + [""] = cmp.mapping.complete(), + }, + sources = { + { name = "nvim_lsp" }, + { name = "luasnip" }, + }, + } + end, + }, + { + "neovim/nvim-lspconfig", + dependencies = { + { "hrsh7th/nvim-cmp" }, + { "j-hui/fidget.nvim", opts = {} }, + }, + config = function() + local caps = vim.lsp.protocol.make_client_capabilities() + caps = require("cmp_nvim_lsp").default_capabilities(caps) + + vim.lsp.config("*", { capabilities = caps }) + + vim.lsp.config("lua_ls", { + settings = { + Lua = { + diagnostics = { + globals = { "vim" }, + }, + workspace = { + checkThirdParty = false, + }, + telemetry = { enable = false }, + }, + }, + }) + + vim.lsp.enable { + "lua_ls", + } + end, + }, +} -- 2.49.1 From 4f8489bfdb4667f18e4d48178f5de714d8c64f78 Mon Sep 17 00:00:00 2001 From: poslop Date: Mon, 9 Feb 2026 13:35:50 -0600 Subject: [PATCH 13/15] lua lsp edits --- lsp/lua_ls.lua | 9 +++++++++ lua/config/lazy.lua | 2 +- lua/plugins/lsp.lua | 14 -------------- readme.md | 5 +++-- 4 files changed, 13 insertions(+), 17 deletions(-) create mode 100644 lsp/lua_ls.lua diff --git a/lsp/lua_ls.lua b/lsp/lua_ls.lua new file mode 100644 index 0000000..f9c20a6 --- /dev/null +++ b/lsp/lua_ls.lua @@ -0,0 +1,9 @@ +return { + settings = { + Lua = { + diagnostics = { globals = { "vim" } }, + workspace = { checkThirdParty = false }, + telemetry = { enable = false }, + }, + }, +} diff --git a/lua/config/lazy.lua b/lua/config/lazy.lua index d0adb76..1434abf 100644 --- a/lua/config/lazy.lua +++ b/lua/config/lazy.lua @@ -12,8 +12,8 @@ if not (vim.uv or vim.loop).fs_stat(lazypath) then os.exit(1) end end -vim.opt.rtp:prepend(lazypath) +vim.opt.rtp:prepend(lazypath) vim.g.mapleader = " " vim.g.maplocalleader = " " diff --git a/lua/plugins/lsp.lua b/lua/plugins/lsp.lua index 4061dfd..e6e457d 100644 --- a/lua/plugins/lsp.lua +++ b/lua/plugins/lsp.lua @@ -36,20 +36,6 @@ return { vim.lsp.config("*", { capabilities = caps }) - vim.lsp.config("lua_ls", { - settings = { - Lua = { - diagnostics = { - globals = { "vim" }, - }, - workspace = { - checkThirdParty = false, - }, - telemetry = { enable = false }, - }, - }, - }) - vim.lsp.enable { "lua_ls", } diff --git a/readme.md b/readme.md index e03cff0..88d0a52 100644 --- a/readme.md +++ b/readme.md @@ -1,7 +1,8 @@ -### Dependencies +## Dependencies -Formatters +### **Lua** ``` +lua-language-server stylua ``` -- 2.49.1 From be94adda8aa1bf1794a96533424548c4b8f02fd3 Mon Sep 17 00:00:00 2001 From: poslop Date: Mon, 9 Feb 2026 14:01:52 -0600 Subject: [PATCH 14/15] cmp --- lua/plugins/cmp.lua | 70 +++++++++++++++++++++++++++++++++++++++++++++ lua/plugins/lsp.lua | 26 ----------------- 2 files changed, 70 insertions(+), 26 deletions(-) create mode 100644 lua/plugins/cmp.lua diff --git a/lua/plugins/cmp.lua b/lua/plugins/cmp.lua new file mode 100644 index 0000000..03cbaa4 --- /dev/null +++ b/lua/plugins/cmp.lua @@ -0,0 +1,70 @@ +return { + { + "hrsh7th/nvim-cmp", + event = "InsertEnter", + dependencies = { + "hrsh7th/cmp-nvim-lsp", + + "L3MON4D3/LuaSnip", + "saadparwaiz1/cmp_luasnip", + + "hrsh7th/cmp-buffer", + "hrsh7th/cmp-path", + "hrsh7th/cmp-cmdline", + }, + config = function() + local cmp = require "cmp" + local luasnip = require "luasnip" + + cmp.setup { + snippet = { + expand = function(args) + luasnip.lsp_expand(args.body) + end, + }, + + mapping = cmp.mapping.preset.insert { + [""] = cmp.mapping.complete(), + [""] = cmp.mapping.confirm { select = true }, + + [""] = cmp.mapping(function(fallback) + if cmp.visible() then + cmp.select_next_item() + elseif luasnip.expand_or_jumpable() then + luasnip.expand_or_jump() + else + fallback() + end + end, { "i", "s" }), + + [""] = cmp.mapping(function(fallback) + if cmp.visible() then + cmp.select_prev_item() + elseif luasnip.jumpable(-1) then + luasnip.jump(-1) + else + fallback() + end + end, { "i", "s" }), + }, + + sources = cmp.config.sources { + { name = "nvim_lsp" }, + { name = "luasnip" }, + { name = "path" }, + { name = "buffer" }, + }, + } + + cmp.setup.cmdline({ "/", "?" }, { + mapping = cmp.mapping.preset.cmdline(), + sources = { { name = "buffer" } }, + }) + + cmp.setup.cmdline(":", { + mapping = cmp.mapping.preset.cmdline(), + sources = cmp.config.sources({ { name = "path" } }, { { name = "cmdline" } }), + }) + end, + }, +} diff --git a/lua/plugins/lsp.lua b/lua/plugins/lsp.lua index e6e457d..610da23 100644 --- a/lua/plugins/lsp.lua +++ b/lua/plugins/lsp.lua @@ -1,29 +1,4 @@ return { - { - "hrsh7th/nvim-cmp", - dependencies = { - "hrsh7th/cmp-nvim-lsp", - "L3MON4D3/LuaSnip", - }, - config = function() - local cmp = require "cmp" - cmp.setup { - snippet = { - expand = function(args) - require("luasnip").lsp_expand(args.body) - end, - }, - mapping = cmp.mapping.preset.insert { - [""] = cmp.mapping.confirm { select = true }, - [""] = cmp.mapping.complete(), - }, - sources = { - { name = "nvim_lsp" }, - { name = "luasnip" }, - }, - } - end, - }, { "neovim/nvim-lspconfig", dependencies = { @@ -35,7 +10,6 @@ return { caps = require("cmp_nvim_lsp").default_capabilities(caps) vim.lsp.config("*", { capabilities = caps }) - vim.lsp.enable { "lua_ls", } -- 2.49.1 From 8ccc729ce7f5ee68620cc1201b7730d324aad996 Mon Sep 17 00:00:00 2001 From: poslop Date: Tue, 10 Feb 2026 13:58:39 -0600 Subject: [PATCH 15/15] yaml --- lua/plugins/format.lua | 2 ++ readme.md | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/lua/plugins/format.lua b/lua/plugins/format.lua index 36c8d9e..d691889 100644 --- a/lua/plugins/format.lua +++ b/lua/plugins/format.lua @@ -17,6 +17,8 @@ return { opts = { formatters_by_ft = { lua = { "stylua" }, + yml = { "yamlfmt" }, + yaml = { "yamlfmt" }, }, default_format_opts = { lsp_format = "fallback", diff --git a/readme.md b/readme.md index 88d0a52..e00af4f 100644 --- a/readme.md +++ b/readme.md @@ -6,3 +6,8 @@ lua-language-server stylua ``` + +### **Yaml** +``` +yamlfmt +``` -- 2.49.1