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 "autocmds"
|
||||||
|
|
||||||
|
vim.schedule(function()
|
||||||
|
require "mappings"
|
||||||
|
end)
|
29
lazy-lock.json
Normal file
29
lazy-lock.json
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
{
|
||||||
|
"LuaSnip": { "branch": "master", "commit": "faf3c94a44508cec1b961406d36cc65113ff3b98" },
|
||||||
|
"NvChad": { "branch": "v2.5", "commit": "d4e5b8a10f01c06e18d2a8bb66761a3596562a67" },
|
||||||
|
"base46": { "branch": "v3.0", "commit": "2dbb72f4ae6f78cb3adc60c2c3b69524f97c9cd6" },
|
||||||
|
"cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" },
|
||||||
|
"cmp-nvim-lsp": { "branch": "main", "commit": "a8912b88ce488f411177fc8aed358b04dc246d7b" },
|
||||||
|
"cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" },
|
||||||
|
"cmp-path": { "branch": "main", "commit": "c6635aae33a50d6010bf1aa756ac2398a2d54c32" },
|
||||||
|
"cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" },
|
||||||
|
"conform.nvim": { "branch": "master", "commit": "6feb2f28f9a9385e401857b21eeac3c1b66dd628" },
|
||||||
|
"friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" },
|
||||||
|
"gitsigns.nvim": { "branch": "main", "commit": "8bdaccdb897945a3c99c1ad8df94db0ddf5c8790" },
|
||||||
|
"indent-blankline.nvim": { "branch": "master", "commit": "005b56001b2cb30bfa61b7986bc50657816ba4ba" },
|
||||||
|
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
|
||||||
|
"mason.nvim": { "branch": "main", "commit": "8024d64e1330b86044fed4c8494ef3dcd483a67c" },
|
||||||
|
"menu": { "branch": "main", "commit": "3c76bdde0be1afe52b370ccfb9c3a12fa93942af" },
|
||||||
|
"minty": { "branch": "main", "commit": "aafc9e8e0afe6bf57580858a2849578d8d8db9e0" },
|
||||||
|
"nvim-autopairs": { "branch": "master", "commit": "4d74e75913832866aa7de35e4202463ddf6efd1b" },
|
||||||
|
"nvim-cmp": { "branch": "main", "commit": "b5311ab3ed9c846b585c0c15b7559be131ec4be9" },
|
||||||
|
"nvim-lspconfig": { "branch": "master", "commit": "b8e7957bde4cbb3cb25a13a62548f7c273b026e9" },
|
||||||
|
"nvim-tree.lua": { "branch": "master", "commit": "ebcaccda1c575fa19a8087445276e6671e2b9b37" },
|
||||||
|
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
|
||||||
|
"nvim-web-devicons": { "branch": "master", "commit": "1fb58cca9aebbc4fd32b086cb413548ce132c127" },
|
||||||
|
"plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" },
|
||||||
|
"telescope.nvim": { "branch": "master", "commit": "b4da76be54691e854d3e0e02c36b0245f945c2c7" },
|
||||||
|
"ui": { "branch": "v3.0", "commit": "7c51760f8772a6695875ac29f8b3c398da7753f0" },
|
||||||
|
"volt": { "branch": "main", "commit": "c45d5f48da8e802e608b5c6da471ca4d84276dfb" },
|
||||||
|
"which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" }
|
||||||
|
}
|
1
lua/autocmds.lua
Normal file
1
lua/autocmds.lua
Normal file
@ -0,0 +1 @@
|
|||||||
|
require "nvchad.autocmds"
|
24
lua/chadrc.lua
Normal file
24
lua/chadrc.lua
Normal file
@ -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 = "onedark",
|
||||||
|
|
||||||
|
-- hl_override = {
|
||||||
|
-- Comment = { italic = true },
|
||||||
|
-- ["@comment"] = { italic = true },
|
||||||
|
-- },
|
||||||
|
}
|
||||||
|
|
||||||
|
-- M.nvdash = { load_on_startup = true }
|
||||||
|
-- M.ui = {
|
||||||
|
-- tabufline = {
|
||||||
|
-- lazyload = false
|
||||||
|
-- }
|
||||||
|
--}
|
||||||
|
|
||||||
|
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",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
6
lua/configs/lspconfig.lua
Normal file
6
lua/configs/lspconfig.lua
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
require("nvchad.configs.lspconfig").defaults()
|
||||||
|
|
||||||
|
local servers = { "html", "cssls" }
|
||||||
|
vim.lsp.enable(servers)
|
||||||
|
|
||||||
|
-- read :h vim.lsp.config for changing options of lsp servers
|
11
lua/mappings.lua
Normal file
11
lua/mappings.lua
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
require "nvchad.mappings"
|
||||||
|
|
||||||
|
-- add yours here
|
||||||
|
|
||||||
|
local map = vim.keymap.set
|
||||||
|
|
||||||
|
map("n", ";", ":", { desc = "CMD enter command mode" })
|
||||||
|
map("i", "jk", "<ESC>")
|
||||||
|
map("n", "<leader>cd", ":cd ..<CR>", { desc = "Go to parent directory" })
|
||||||
|
|
||||||
|
-- map({ "n", "i", "v" }, "<C-s>", "<cmd> w <cr>")
|
6
lua/options.lua
Normal file
6
lua/options.lua
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
require "nvchad.options"
|
||||||
|
|
||||||
|
-- add yours here!
|
||||||
|
|
||||||
|
-- local o = vim.o
|
||||||
|
-- o.cursorlineopt ='both' -- to enable cursorline!
|
28
lua/plugins/init.lua
Normal file
28
lua/plugins/init.lua
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
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,
|
||||||
|
},
|
||||||
|
|
||||||
|
-- test new blink
|
||||||
|
-- { import = "nvchad.blink.lazyspec" },
|
||||||
|
|
||||||
|
-- {
|
||||||
|
-- "nvim-treesitter/nvim-treesitter",
|
||||||
|
-- opts = {
|
||||||
|
-- ensure_installed = {
|
||||||
|
-- "vim", "lua", "vimdoc",
|
||||||
|
-- "html", "css"
|
||||||
|
-- },
|
||||||
|
-- },
|
||||||
|
-- },
|
||||||
|
}
|
Reference in New Issue
Block a user