Compare commits

..

23 Commits

Author SHA1 Message Date
bb5185eac4 buffer mappings 2026-02-06 16:16:56 -06:00
2a63e1d8ef terminal 2026-02-06 15:45:54 -06:00
9499cc8072 luaformat 2026-02-06 14:29:42 -06:00
4126124208 idr 2026-02-06 13:38:25 -06:00
e1a0c21a6e base 2026-02-06 09:22:25 -06:00
54db1b62f9 convert to custom 2026-02-06 07:50:23 -06:00
0bdaff2282 mason lsp 2026-01-30 23:35:41 -06:00
cbf12def45 jphp sup 2026-01-30 10:45:28 -06:00
eab1653d4e plugins 2026-01-26 16:04:02 -06:00
d9dbec840a Update README.md 2026-01-14 13:17:48 -06:00
poslop
2c6ea74dec update readme install 2026-01-14 13:17:02 -06:00
poslop
efb9359686 gitignore 2026-01-14 13:12:54 -06:00
Connor Denihan
e3572e1f5e Update chadrc.lua (#91) 2025-07-31 10:46:58 +05:30
Connor Denihan
5c656910f0 Fix: Grammatical Error in README.md 2025-06-20 22:46:27 +05:30
siduck
925399d90c add example of autocmds by default 2025-05-25 11:49:51 +05:30
Sidhanth Rathod
2b4293a4c1 Update lspconfig.lua 2025-05-04 13:50:03 +05:30
siduck
85404dcb03 add example for blink users 2025-04-15 07:55:35 +05:30
siduck
2ef0168470 use vim.lsp.config & vim.lsp.enable 2025-04-15 07:55:31 +05:30
Sidhanth Rathod
c3d1fb646a Update chadrc.lua 2025-01-12 06:29:04 +05:30
Sidhanth Rathod
d0c602f5f1 Merge pull request #50 from algren123/docs/update-nvconfig-reference
docs: updated chadrc.lua reference to nvconfig.lua to point to v3.0
2024-10-05 17:33:03 +05:30
Algren-Michael Pauna
6db16815ac docs: updated chadrc.lua reference to nvconfig.lua to point to v3.0 instead of v2.5 2024-10-05 12:50:23 +01:00
Sidhanth Rathod
76da790a27 Merge pull request #47 from 0xTux/main
fix path for base64 plugin
2024-10-02 05:48:51 +05:30
tux
0eb7d42b30 fix path for base64 plugin 2024-10-02 05:38:25 +05:30
20 changed files with 162 additions and 214 deletions

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
lazy-lock.json

24
LICENSE
View File

@@ -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 <https://unlicense.org>

View File

@@ -1,9 +0,0 @@
**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!

View File

@@ -1,37 +1 @@
vim.g.base46_cache = vim.fn.stdpath "data" .. "/nvchad/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)
require("config.lazy")

View File

@@ -1,17 +0,0 @@
-- This file needs to have same structure as nvconfig.lua
-- https://github.com/NvChad/ui/blob/v2.5/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

33
lua/config/lazy.lua Normal file
View File

@@ -0,0 +1,33 @@
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)
vim.g.mapleader = " "
vim.g.maplocalleader = " "
require("config.maps")
require("config.opts")
require("lazy").setup({
spec = {
{ import = "plugins" },
},
install = { colorscheme = { "tokyonight" } },
checker = { enabled = true },
})
vim.cmd[[colorscheme tokyonight]]
require("bufferline").setup{}

29
lua/config/maps.lua Normal file
View File

@@ -0,0 +1,29 @@
local map = vim.keymap.set
map("n", "<leader>e", "<cmd>NvimTreeToggle<CR>", { desc = "NvimTree" })
map("n", "<leader>f", function()
require("conform").format { async = true }
end, { desc = "Format buffer" })
map("n", "<C-h>", "<C-w>h", { desc = "switch window left" })
map("n", "<C-l>", "<C-w>l", { desc = "switch window right" })
map("n", "<C-j>", "<C-w>j", { desc = "switch window down" })
map("n", "<C-k>", "<C-w>k", { desc = "switch window up" })
map("n", "<Esc>", "<cmd>noh<CR>", { desc = "general clear highlights" })
map("n", "<leader>n", "<cmd>set nu!<CR>", { desc = "toggle line number" })
map("n", "<leader>/", "gcc", { desc = "toggle comment", remap = true })
map("v", "<leader>/", "gc", { desc = "toggle comment", remap = true })
map("t", "<C-x>", "<C-\\><C-N>", { desc = "terminal escape terminal mode" })
map("n", "<leader>th", "<cmd>ToggleTerm direction=horizontal<cr>", { desc = "ToggleTerm: horizontal" })
map("n", "<leader>tf", "<cmd>ToggleTerm direction=float<cr>", { desc = "ToggleTerm: float" })
map("n", "<Tab>", "<cmd>BufferLineCycleNext<cr>", { desc = "Next buffer" })
map("n", "<S-Tab>", "<cmd>BufferLineCyclePrev<cr>", { desc = "Previous buffer" })
map("n", "<leader>ba", "<cmd>BufferLineCloseOthers<CR>", { desc = "Close other buffers" })
map("n", "<leader>x", "<cmd>bdelete<CR>", { desc = "Close buffer" })

7
lua/config/opts.lua Normal file
View File

@@ -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

View File

@@ -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

View File

@@ -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",
},
},
},
}

View File

@@ -1,24 +0,0 @@
-- 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,
-- }

View File

@@ -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", "<ESC>")
-- map({ "n", "i", "v" }, "<C-s>", "<cmd> w <cr>")

View File

@@ -1,6 +0,0 @@
require "nvchad.options"
-- add yours here!
-- local o = vim.o
-- o.cursorlineopt ='both' -- to enable cursorline!

32
lua/plugins/format.lua Normal file
View File

@@ -0,0 +1,32 @@
return {
{
'windwp/nvim-autopairs',
event = "InsertEnter",
config = true
},
{
"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" },
},
},
},
}
}

View File

@@ -1,25 +0,0 @@
return {
{
"stevearc/conform.nvim",
-- event = 'BufWritePre', -- uncomment for format on save
opts = require "configs.conform",
},
-- These are some examples, uncomment them if you want to see them work!
{
"neovim/nvim-lspconfig",
config = function()
require "configs.lspconfig"
end,
},
-- {
-- "nvim-treesitter/nvim-treesitter",
-- opts = {
-- ensure_installed = {
-- "vim", "lua", "vimdoc",
-- "html", "css"
-- },
-- },
-- },
}

5
lua/plugins/markdown.lua Normal file
View File

@@ -0,0 +1,5 @@
return {
{
"iamcco/markdown-preview.nvim"
}
}

8
lua/plugins/theme.lua Normal file
View File

@@ -0,0 +1,8 @@
return {
{
"folke/tokyonight.nvim",
lazy = false,
priority = 1000,
opts = {},
},
}

15
lua/plugins/which.lua Normal file
View File

@@ -0,0 +1,15 @@
return {
{
"folke/which-key.nvim",
event = "VeryLazy",
keys = {
{
"<leader>?",
function()
require("which-key").show({ global = false })
end,
desc = "Buffer Local Keymaps (which-key)",
},
},
}
}

24
lua/plugins/windows.lua Normal file
View File

@@ -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",
},
}

7
readme.md Normal file
View File

@@ -0,0 +1,7 @@
### Dependencies
Formatters
```
stylua
```