aboutsummaryrefslogtreecommitdiff
path: root/nvim
diff options
context:
space:
mode:
authorAargh Rai <aargh.rai+git@gmail.com>2025-09-07 18:03:20 +0530
committerAargh Rai <aargh.rai+git@gmail.com>2025-09-07 18:03:20 +0530
commit2cc42213f120ffe6a2f06f610bccc31f0c68c2e7 (patch)
treed1a1fbe8f49e500758044e8893d733e49ef58773 /nvim
parentc4e46f4ee64a0096bb836de0346d3ca5ff2b8145 (diff)
removed nvim submodule
Diffstat (limited to 'nvim')
m---------nvim0
-rw-r--r--nvim/.stylua.toml6
-rw-r--r--nvim/LICENSE24
-rw-r--r--nvim/README.md9
-rw-r--r--nvim/init.lua37
-rw-r--r--nvim/lazy-lock.json31
-rw-r--r--nvim/lua/autocmds.lua1
-rw-r--r--nvim/lua/chadrc.lua24
-rw-r--r--nvim/lua/configs/conform.lua15
-rw-r--r--nvim/lua/configs/lazy.lua47
-rw-r--r--nvim/lua/configs/lspconfig.lua67
-rw-r--r--nvim/lua/mappings.lua8
-rw-r--r--nvim/lua/options.lua9
-rw-r--r--nvim/lua/plugins/init.lua50
14 files changed, 328 insertions, 0 deletions
diff --git a/nvim b/nvim
deleted file mode 160000
-Subproject 596f6369699027083414ebc4f306ccfd1782e82
diff --git a/nvim/.stylua.toml b/nvim/.stylua.toml
new file mode 100644
index 0000000..ecb6dca
--- /dev/null
+++ b/nvim/.stylua.toml
@@ -0,0 +1,6 @@
+column_width = 120
+line_endings = "Unix"
+indent_type = "Spaces"
+indent_width = 2
+quote_style = "AutoPreferDouble"
+call_parentheses = "None"
diff --git a/nvim/LICENSE b/nvim/LICENSE
new file mode 100644
index 0000000..fdddb29
--- /dev/null
+++ b/nvim/LICENSE
@@ -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>
diff --git a/nvim/README.md b/nvim/README.md
new file mode 100644
index 0000000..769fbdf
--- /dev/null
+++ b/nvim/README.md
@@ -0,0 +1,9 @@
+**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/nvim/init.lua b/nvim/init.lua
new file mode 100644
index 0000000..e861b68
--- /dev/null
+++ b/nvim/init.lua
@@ -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 "autocmds"
+
+vim.schedule(function()
+ require "mappings"
+end)
diff --git a/nvim/lazy-lock.json b/nvim/lazy-lock.json
new file mode 100644
index 0000000..a4b5e84
--- /dev/null
+++ b/nvim/lazy-lock.json
@@ -0,0 +1,31 @@
+{
+ "LuaSnip": { "branch": "master", "commit": "eda5be8f0ce9816278671f0b578cdbb8b762c701" },
+ "NvChad": { "branch": "v2.5", "commit": "a792fd1d96c1511a165b18911164baa28bf1d6f4" },
+ "base46": { "branch": "v3.0", "commit": "2dbb72f4ae6f78cb3adc60c2c3b69524f97c9cd6" },
+ "cmp-async-path": { "branch": "main", "commit": "0ed1492f59e730c366d261a5ad822fa37e44c325" },
+ "cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" },
+ "cmp-nvim-lsp": { "branch": "main", "commit": "a8912b88ce488f411177fc8aed358b04dc246d7b" },
+ "cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" },
+ "cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" },
+ "conform.nvim": { "branch": "master", "commit": "973f3cb73887d510321653044791d7937c7ec0fa" },
+ "friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" },
+ "gitsigns.nvim": { "branch": "main", "commit": "362fe61f9f19e9bceff178792780df5cce118a7d" },
+ "indent-blankline.nvim": { "branch": "master", "commit": "005b56001b2cb30bfa61b7986bc50657816ba4ba" },
+ "lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
+ "mason.nvim": { "branch": "main", "commit": "8024d64e1330b86044fed4c8494ef3dcd483a67c" },
+ "menu": { "branch": "main", "commit": "7a0a4a2896b715c066cfbe320bdc048091874cc6" },
+ "minty": { "branch": "main", "commit": "aafc9e8e0afe6bf57580858a2849578d8d8db9e0" },
+ "nvim-autopairs": { "branch": "master", "commit": "23320e75953ac82e559c610bec5a90d9c6dfa743" },
+ "nvim-cmp": { "branch": "main", "commit": "b5311ab3ed9c846b585c0c15b7559be131ec4be9" },
+ "nvim-lspconfig": { "branch": "master", "commit": "7fac9025a967a4d0846660f751cd392fac6bb788" },
+ "nvim-tree.lua": { "branch": "master", "commit": "b0b49552c9462900a882fe772993b01d780445fe" },
+ "nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
+ "nvim-web-devicons": { "branch": "master", "commit": "19d6211c78169e78bab372b585b6fb17ad974e82" },
+ "plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" },
+ "telescope.nvim": { "branch": "master", "commit": "b4da76be54691e854d3e0e02c36b0245f945c2c7" },
+ "ui": { "branch": "v3.0", "commit": "ec5b1f8e591b2e8f1cd3653b41bb14d9cd43dfd1" },
+ "undotree": { "branch": "master", "commit": "15d91b0afe04ea9ba5cd53e30190d1602af9a925" },
+ "vim-tmux-navigator": { "branch": "master", "commit": "c45243dc1f32ac6bcf6068e5300f3b2b237e576a" },
+ "volt": { "branch": "main", "commit": "7b8c5e790120d9f08c8487dcb80692db6d2087a1" },
+ "which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" }
+}
diff --git a/nvim/lua/autocmds.lua b/nvim/lua/autocmds.lua
new file mode 100644
index 0000000..d2db0bb
--- /dev/null
+++ b/nvim/lua/autocmds.lua
@@ -0,0 +1 @@
+require "nvchad.autocmds"
diff --git a/nvim/lua/chadrc.lua b/nvim/lua/chadrc.lua
new file mode 100644
index 0000000..9f9eecc
--- /dev/null
+++ b/nvim/lua/chadrc.lua
@@ -0,0 +1,24 @@
+-- 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 = "catppuccin",
+
+ -- hl_override = {
+ -- Comment = { italic = true },
+ -- ["@comment"] = { italic = true },
+ -- },
+}
+
+-- M.nvdash = { load_on_startup = true }
+-- M.ui = {
+-- tabufline = {
+-- lazyload = false
+-- }
+--}
+
+return M
diff --git a/nvim/lua/configs/conform.lua b/nvim/lua/configs/conform.lua
new file mode 100644
index 0000000..35ba6cf
--- /dev/null
+++ b/nvim/lua/configs/conform.lua
@@ -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
diff --git a/nvim/lua/configs/lazy.lua b/nvim/lua/configs/lazy.lua
new file mode 100644
index 0000000..cd170bd
--- /dev/null
+++ b/nvim/lua/configs/lazy.lua
@@ -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",
+ },
+ },
+ },
+}
diff --git a/nvim/lua/configs/lspconfig.lua b/nvim/lua/configs/lspconfig.lua
new file mode 100644
index 0000000..cc741bd
--- /dev/null
+++ b/nvim/lua/configs/lspconfig.lua
@@ -0,0 +1,67 @@
+require("nvchad.configs.lspconfig").defaults()
+
+local servers = { "html", "cssls", "rust_analyzer", "zls" }
+vim.lsp.enable(servers)
+
+local lspconfig = require("lspconfig")
+
+-- Rust
+lspconfig.rust_analyzer.setup{}
+
+-- Zig
+lspconfig.zls.setup{
+ cmd = { "zls" },
+ filetypes = { "zig", "zir" },
+ root_dir = lspconfig.util.root_pattern("build.zig", "zls.json", ".git")
+}
+
+-- TS/JS
+lspconfig.ts_ls.setup {
+ cmd = { "typescript-language-server", "--stdio" },
+ filetypes = {
+ "javascript", "javascriptreact",
+ "typescript", "typescriptreact",
+ "javascript.jsx", "typescript.tsx"
+ },
+ root_dir = lspconfig.util.root_pattern("package.json", "tsconfig.json", ".git")
+}
+
+-- Python
+lspconfig.pylsp.setup {
+ cmd = { "pylsp" },
+ filetypes = { "python" },
+ settings = {
+ pylsp = {
+ plugins = {
+ black = { enabled = true },
+ ruff = { enabled = true },
+ flake8 = { enabled = true },
+ isort = { enabled = true }
+ }
+ }
+ }
+}
+
+-- Elixir
+lspconfig.elixirls.setup {
+ cmd = { "elixir-ls" },
+ filetypes = { "elixir" },
+}
+
+-- Erlang
+lspconfig.erlangls.setup {
+ cmd = { "erlang-ls" },
+ filetypes = { "erlang" },
+}
+
+-- C/C++
+lspconfig.clangd.setup {
+ cmd = { "clangd" },
+ filetypes = { "c", "cpp" }
+}
+
+-- Gopls
+lspconfig.gopls.setup {
+ cmd = { "gopls" },
+ filetype = { "go" }
+}
diff --git a/nvim/lua/mappings.lua b/nvim/lua/mappings.lua
new file mode 100644
index 0000000..79e634e
--- /dev/null
+++ b/nvim/lua/mappings.lua
@@ -0,0 +1,8 @@
+require "nvchad.mappings"
+
+local map = vim.keymap.set
+local unmap = vim.keymap.del
+
+map("n", ";", ":", { desc = "CMD enter command mode" })
+map({ "n", "i", "v" }, "<C-s>", "<cmd> w <cr>")
+map({ "n", "v" }, "<C-f>", ":%s/")
diff --git a/nvim/lua/options.lua b/nvim/lua/options.lua
new file mode 100644
index 0000000..c5af716
--- /dev/null
+++ b/nvim/lua/options.lua
@@ -0,0 +1,9 @@
+require "nvchad.options"
+
+-- add yours here!
+vim.opt.wrap = false
+vim.opt.spell = true
+vim.opt.spelllang = { "en" }
+
+-- local o = vim.o
+-- o.cursorlineopt ='both' -- to enable cursorline!
diff --git a/nvim/lua/plugins/init.lua b/nvim/lua/plugins/init.lua
new file mode 100644
index 0000000..c9b7ea8
--- /dev/null
+++ b/nvim/lua/plugins/init.lua
@@ -0,0 +1,50 @@
+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,
+ },
+
+ {
+ "mbbill/undotree",
+ event = "BufReadPost",
+ config = function()
+ vim.keymap.set("n", "<leader>u", vim.cmd.UndotreeToggle, { desc = "Toggle UndoTree" })
+ end,
+ },
+
+ -- test new blink
+ -- { import = "nvchad.blink.lazyspec" },
+
+ {
+ "nvim-treesitter/nvim-treesitter",
+ opts = {
+ ensure_installed = {
+ "vim", "lua", "vimdoc",
+ "html", "css", "elixir", "rust"
+ },
+ },
+ },
+
+ {
+ "christoomey/vim-tmux-navigator",
+ lazy = false,
+ },
+
+ {
+ "nvim-tree/nvim-tree.lua",
+ opts = {
+ view = {
+ side = "right"
+ }
+ }
+ },
+}