initial commit
This commit is contained in:
6
.stylua.toml
Normal file
6
.stylua.toml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
column_width = 120
|
||||||
|
line_endings = "Unix"
|
||||||
|
indent_type = "Spaces"
|
||||||
|
indent_width = 2
|
||||||
|
quote_style = "AutoPreferDouble"
|
||||||
|
call_parentheses = "None"
|
24
LICENSE
Normal file
24
LICENSE
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
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 <https://unlicense.org>
|
9
README.md
Normal file
9
README.md
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
**This repo is supposed to 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!
|
37
init.lua
Normal file
37
init.lua
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
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 "nvchad.autocmds"
|
||||||
|
|
||||||
|
vim.schedule(function()
|
||||||
|
require "mappings"
|
||||||
|
end)
|
32
lazy-lock.json
Normal file
32
lazy-lock.json
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
{
|
||||||
|
"LuaSnip": { "branch": "master", "commit": "0f7bbce41ea152a94d12aea286f2ce98e63c0f58" },
|
||||||
|
"NvChad": { "branch": "v2.5", "commit": "bbc3d43db088c141b142a40cd5f717635833a54e" },
|
||||||
|
"base46": { "branch": "v2.5", "commit": "8971be55aeb6d5fe086169c0ee9ce647a3871570" },
|
||||||
|
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
|
||||||
|
"cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" },
|
||||||
|
"cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" },
|
||||||
|
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
||||||
|
"cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" },
|
||||||
|
"conform.nvim": { "branch": "master", "commit": "023f795dbcf32d4351b6a9ed2e613d471b5bb812" },
|
||||||
|
"core.nvim": { "branch": "main", "commit": "26ada48758e73ff3763ac134a9a0da320a7762e4" },
|
||||||
|
"friendly-snippets": { "branch": "main", "commit": "de8fce94985873666bd9712ea3e49ee17aadb1ed" },
|
||||||
|
"gitsigns.nvim": { "branch": "main", "commit": "ac5aba6dce8c06ea22bea2c9016f51a2dbf90dc7" },
|
||||||
|
"indent-blankline.nvim": { "branch": "master", "commit": "7871a88056f7144defca9c931e311a3134c5d509" },
|
||||||
|
"lazy.nvim": { "branch": "main", "commit": "7967abe55752aa90532e6bb4bd4663fe27a264cb" },
|
||||||
|
"mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" },
|
||||||
|
"menu": { "branch": "main", "commit": "657bfc91382c0928453d9a4d0a10ec92db5de2bb" },
|
||||||
|
"minty": { "branch": "main", "commit": "a3d69bd63fc98f640815f94b797bf978e9193022" },
|
||||||
|
"nvim-autopairs": { "branch": "master", "commit": "b464658e9b880f463b9f7e6ccddd93fb0013f559" },
|
||||||
|
"nvim-cmp": { "branch": "main", "commit": "f17d9b4394027ff4442b298398dfcaab97e40c4f" },
|
||||||
|
"nvim-lspconfig": { "branch": "master", "commit": "f012c1b176f0e3c71f40eb309bdec0316689462e" },
|
||||||
|
"nvim-tree.lua": { "branch": "master", "commit": "f7c65e11d695a084ca10b93df659bb7e68b71f9f" },
|
||||||
|
"nvim-treesitter": { "branch": "master", "commit": "37427012d1c77c544356bfff0c9acc88fd3256bc" },
|
||||||
|
"nvim-web-devicons": { "branch": "master", "commit": "e87554285f581047b1bf236794b0eb812b444b87" },
|
||||||
|
"plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" },
|
||||||
|
"projectmgr.nvim": { "branch": "main", "commit": "2d29b21b5afefa7a1690854c56db9b43195d9a10" },
|
||||||
|
"supermaven-nvim": { "branch": "main", "commit": "07d20fce48a5629686aefb0a7cd4b25e33947d50" },
|
||||||
|
"telescope.nvim": { "branch": "master", "commit": "85922dde3767e01d42a08e750a773effbffaea3e" },
|
||||||
|
"ui": { "branch": "v3.0", "commit": "9b31c25fc497d1ef726de15ae297769dbf90c1a5" },
|
||||||
|
"volt": { "branch": "main", "commit": "41c03a5d6a0a8a997e774a3482d82e5ef820c6ba" },
|
||||||
|
"which-key.nvim": { "branch": "main", "commit": "68e37e12913a66b60073906f5d3f14dee0de19f2" }
|
||||||
|
}
|
17
lua/chadrc.lua
Normal file
17
lua/chadrc.lua
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
-- 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 },
|
||||||
|
-- },
|
||||||
|
}
|
||||||
|
|
||||||
|
return M
|
15
lua/configs/conform.lua
Normal file
15
lua/configs/conform.lua
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
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
|
47
lua/configs/lazy.lua
Normal file
47
lua/configs/lazy.lua
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
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",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
24
lua/configs/lspconfig.lua
Normal file
24
lua/configs/lspconfig.lua
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
-- load defaults i.e lua_lsp
|
||||||
|
require("nvchad.configs.lspconfig").defaults()
|
||||||
|
|
||||||
|
local lspconfig = require "lspconfig"
|
||||||
|
|
||||||
|
-- EXAMPLE
|
||||||
|
local servers = { "html", "cssls" }
|
||||||
|
local nvlsp = require "nvchad.configs.lspconfig"
|
||||||
|
|
||||||
|
-- lsps with default config
|
||||||
|
for _, lsp in ipairs(servers) do
|
||||||
|
lspconfig[lsp].setup {
|
||||||
|
on_attach = nvlsp.on_attach,
|
||||||
|
on_init = nvlsp.on_init,
|
||||||
|
capabilities = nvlsp.capabilities,
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
-- configuring single server, example: typescript
|
||||||
|
-- lspconfig.ts_ls.setup {
|
||||||
|
-- on_attach = nvlsp.on_attach,
|
||||||
|
-- on_init = nvlsp.on_init,
|
||||||
|
-- capabilities = nvlsp.capabilities,
|
||||||
|
-- }
|
10
lua/mappings.lua
Normal file
10
lua/mappings.lua
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
require "nvchad.mappings"
|
||||||
|
|
||||||
|
-- add yours here
|
||||||
|
|
||||||
|
local map = vim.keymap.set
|
||||||
|
|
||||||
|
map("n", ";", ":", { desc = "CMD enter command mode" })
|
||||||
|
map("i", "jk", "<ESC>")
|
||||||
|
|
||||||
|
-- map({ "n", "i", "v" }, "<C-s>", "<cmd> w <cr>")
|
122
lua/options.lua
Normal file
122
lua/options.lua
Normal file
@@ -0,0 +1,122 @@
|
|||||||
|
-----------------------------------------------------------
|
||||||
|
-- Neovim Options Configuration
|
||||||
|
-----------------------------------------------------------
|
||||||
|
|
||||||
|
-- Load NvChad default options
|
||||||
|
require("nvchad.options")
|
||||||
|
|
||||||
|
-----------------------------------------------------------
|
||||||
|
-- Global Variables
|
||||||
|
-----------------------------------------------------------
|
||||||
|
|
||||||
|
--[[
|
||||||
|
Global configuration variables for various plugins and features:
|
||||||
|
- dap_virtual_text: Debug Adapter Protocol virtual text
|
||||||
|
- bookmark_sign: Visual indicator for bookmarks
|
||||||
|
- skip_ts_context_commentstring_module: Treesitter comment handling
|
||||||
|
- tabufline_visible: Tab line visibility control
|
||||||
|
--]]
|
||||||
|
local g = {
|
||||||
|
dap_virtual_text = true, -- Enable virtual text for debugging
|
||||||
|
bookmark_sign = "", -- Custom bookmark indicator
|
||||||
|
skip_ts_context_commentstring_module = true,
|
||||||
|
tabufline_visible = true, -- Show tab line
|
||||||
|
}
|
||||||
|
|
||||||
|
-----------------------------------------------------------
|
||||||
|
-- Editor Options
|
||||||
|
-----------------------------------------------------------
|
||||||
|
|
||||||
|
--[[
|
||||||
|
Core editor settings organized by functionality:
|
||||||
|
1. Text Encoding & Clipboard
|
||||||
|
2. Code Folding & Structure
|
||||||
|
3. File Management
|
||||||
|
4. Visual Display
|
||||||
|
5. Text Formatting
|
||||||
|
6. Editor Behavior
|
||||||
|
7. Search & Navigation
|
||||||
|
8. Path & Keyword Configuration
|
||||||
|
--]]
|
||||||
|
local opt = {
|
||||||
|
-------------------
|
||||||
|
-- Text Encoding & Clipboard
|
||||||
|
-------------------
|
||||||
|
encoding = "utf-8", -- Internal encoding
|
||||||
|
fileencoding = "utf-8", -- File encoding
|
||||||
|
clipboard = "unnamedplus", -- System clipboard integration (WSL-aware)
|
||||||
|
|
||||||
|
-------------------
|
||||||
|
-- Code Folding & Structure
|
||||||
|
-------------------
|
||||||
|
foldmethod = "expr", -- Use expression for folding
|
||||||
|
foldexpr = "v:lua.vim.treesitter.foldexpr()",
|
||||||
|
foldcolumn = "0", -- Hide fold column
|
||||||
|
foldtext = "", -- No custom fold text
|
||||||
|
foldlevel = 99, -- High initial fold level
|
||||||
|
foldlevelstart = 5, -- Start with some folds closed
|
||||||
|
foldnestmax = 5, -- Maximum fold nesting
|
||||||
|
|
||||||
|
-------------------
|
||||||
|
-- Visual Display
|
||||||
|
-------------------
|
||||||
|
scrolloff = 10, -- Lines of context
|
||||||
|
termguicolors = true, -- True color support
|
||||||
|
emoji = false, -- Disable emoji support
|
||||||
|
relativenumber = true, -- Relative line numbers
|
||||||
|
cursorline = true, -- Highlight current line
|
||||||
|
cursorlineopt = "both", -- Highlight line number and text
|
||||||
|
|
||||||
|
-------------------
|
||||||
|
-- Text Formatting
|
||||||
|
-------------------
|
||||||
|
wrap = true, -- Enable line wrapping
|
||||||
|
linebreak = true, -- Break at word boundaries
|
||||||
|
textwidth = 0, -- Disable auto text width
|
||||||
|
wrapmargin = 0, -- No margin for wrapping
|
||||||
|
tabstop = 4, -- 2 spaces per tab
|
||||||
|
shiftwidth = 0, -- Match tabstop
|
||||||
|
expandtab = true, -- Use spaces for tabs
|
||||||
|
autoindent = true, -- Maintain indent level
|
||||||
|
|
||||||
|
-------------------
|
||||||
|
-- Editor Behavior
|
||||||
|
-------------------
|
||||||
|
updatetime = 100, -- Faster updates
|
||||||
|
lazyredraw = false, -- Don't defer screen updates
|
||||||
|
inccommand = "split", -- Live substitution preview
|
||||||
|
|
||||||
|
-------------------
|
||||||
|
-- Search & Navigation
|
||||||
|
-------------------
|
||||||
|
ignorecase = true, -- Case-insensitive search
|
||||||
|
|
||||||
|
-------------------
|
||||||
|
-- Path & Keyword Configuration
|
||||||
|
-------------------
|
||||||
|
iskeyword = vim.opt.iskeyword:append({
|
||||||
|
"_", -- Treat underscore as word char
|
||||||
|
"@", -- Include @ in keywords
|
||||||
|
"-", -- Include dash in keywords
|
||||||
|
}),
|
||||||
|
path = vim.opt.path:append({
|
||||||
|
"**", -- Recursive search
|
||||||
|
"lua", -- Lua directory
|
||||||
|
"src", -- Source directory
|
||||||
|
}),
|
||||||
|
shada = "'1000,f1,<500", -- Increase shada size for better buffer retention
|
||||||
|
}
|
||||||
|
|
||||||
|
-----------------------------------------------------------
|
||||||
|
-- Apply Settings
|
||||||
|
-----------------------------------------------------------
|
||||||
|
|
||||||
|
-- Apply global variables
|
||||||
|
for k, v in pairs(g) do
|
||||||
|
vim.g[k] = v
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Apply editor options
|
||||||
|
for k, v in pairs(opt) do
|
||||||
|
vim.opt[k] = v
|
||||||
|
end
|
56
lua/plugins/init.lua
Normal file
56
lua/plugins/init.lua
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
"stevearc/conform.nvim",
|
||||||
|
-- event = 'BufWritePre', -- uncomment for format on save
|
||||||
|
opts = require "configs.conform",
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"charludo/projectmgr.nvim",
|
||||||
|
lazy = false, -- Required for proper functionality
|
||||||
|
},
|
||||||
|
|
||||||
|
-- These are some examples, uncomment them if you want to see them work!
|
||||||
|
{
|
||||||
|
"neovim/nvim-lspconfig",
|
||||||
|
config = function()
|
||||||
|
require "configs.lspconfig"
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Supermaven
|
||||||
|
{
|
||||||
|
"supermaven-inc/supermaven-nvim",
|
||||||
|
lazy = false,
|
||||||
|
config = function()
|
||||||
|
require("supermaven-nvim").setup {
|
||||||
|
keymaps = {
|
||||||
|
accept_suggestion = "<A-l>",
|
||||||
|
clear_suggestion = "<C-]>",
|
||||||
|
accept_word = "<C-j>",
|
||||||
|
},
|
||||||
|
ignore_filetypes = { cpp = true }, -- or { "cpp", }
|
||||||
|
color = {
|
||||||
|
suggestion_color = "#ffffff",
|
||||||
|
cterm = 244,
|
||||||
|
},
|
||||||
|
log_level = "info", -- set to "off" to disable logging completely
|
||||||
|
disable_inline_completion = false, -- disables inline completion for use with cmp
|
||||||
|
disable_keymaps = false, -- disables built in keymaps for more manual control
|
||||||
|
condition = function()
|
||||||
|
return false
|
||||||
|
end, -- condition to check for stopping supermaven, `true` means to stop supermaven when the condition is true.
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
-- {
|
||||||
|
-- "nvim-treesitter/nvim-treesitter",
|
||||||
|
-- opts = {
|
||||||
|
-- ensure_installed = {
|
||||||
|
-- "vim", "lua", "vimdoc",
|
||||||
|
-- "html", "css"
|
||||||
|
-- },
|
||||||
|
-- },
|
||||||
|
-- },
|
||||||
|
}
|
21
pero.vim
Normal file
21
pero.vim
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
set clipboard+=unnamed
|
||||||
|
|
||||||
|
set relativenumber
|
||||||
|
set number
|
||||||
|
set cursorline
|
||||||
|
set mouse=a
|
||||||
|
set scrolloff=20
|
||||||
|
set sidescrolloff=5
|
||||||
|
syntax enable
|
||||||
|
set wrap
|
||||||
|
set linebreak
|
||||||
|
set ignorecase
|
||||||
|
set hlsearch
|
||||||
|
"set autoindent
|
||||||
|
"set foldenable
|
||||||
|
set foldmethod=indent
|
||||||
|
set history=1000
|
||||||
|
set nofoldenable
|
||||||
|
|
||||||
|
let @q = 'GpA ^['
|
||||||
|
let @w = 'Gpo^['
|
Reference in New Issue
Block a user