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 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!
|
||||
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)
|
||||
35
lazy-lock.json
Normal file
35
lazy-lock.json
Normal file
@@ -0,0 +1,35 @@
|
||||
{
|
||||
"LuaSnip": { "branch": "master", "commit": "642b0c595e11608b4c18219e93b88d7637af27bc" },
|
||||
"NvChad": { "branch": "v2.5", "commit": "f437558f23c8f50c36cd09748121ab2c822e8ec9" },
|
||||
"base46": { "branch": "v3.0", "commit": "884b990dcdbe07520a0892da6ba3e8d202b46337" },
|
||||
"blink.cmp": { "branch": "main", "commit": "451168851e8e2466bc97ee3e026c3dcb9141ce07" },
|
||||
"conform.nvim": { "branch": "master", "commit": "086a40dc7ed8242c03be9f47fbcee68699cc2395" },
|
||||
"diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" },
|
||||
"friendly-snippets": { "branch": "main", "commit": "6cd7280adead7f586db6fccbd15d2cac7e2188b9" },
|
||||
"fzf-lua": { "branch": "main", "commit": "3b01dc83a893749f5ae4639f1aa0af523821840a" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "0a80125bace82d82847d40bc2c38a22d62c6dc2d" },
|
||||
"indent-blankline.nvim": { "branch": "master", "commit": "d28a3f70721c79e3c5f6693057ae929f3d9c0a03" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "85c7ff3711b730b4030d03144f6db6375044ae82" },
|
||||
"markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" },
|
||||
"mason.nvim": { "branch": "main", "commit": "44d1e90e1f66e077268191e3ee9d2ac97cc18e65" },
|
||||
"menu": { "branch": "main", "commit": "7a0a4a2896b715c066cfbe320bdc048091874cc6" },
|
||||
"minty": { "branch": "main", "commit": "aafc9e8e0afe6bf57580858a2849578d8d8db9e0" },
|
||||
"neogit": { "branch": "master", "commit": "64b1a01a9fc3d3ee8b2368230563bedf3eb66e54" },
|
||||
"nvim-autopairs": { "branch": "master", "commit": "59bce2eef357189c3305e25bc6dd2d138c1683f5" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "da88697d7f45d16852c6b2769dc52387d1ddc45f" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "4daa1436595dbce4c6151f75c38a0d855796c554" },
|
||||
"nvim-tree.lua": { "branch": "master", "commit": "3d385d3346e4883d60dc37cf642bd47bed78a46e" },
|
||||
"nvim-treesitter": { "branch": "main", "commit": "6620ae1c44dfa8623b22d0cbf873a9e8d073b849" },
|
||||
"nvim-ts-autotag": { "branch": "main", "commit": "8e1c0a389f20bf7f5b0dd0e00306c1247bda2595" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "d7462543c9e366c0d196c7f67a945eaaf5d99414" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
|
||||
"presence.nvim": { "branch": "main", "commit": "87c857a56b7703f976d3a5ef15967d80508df6e6" },
|
||||
"sg.nvim": { "branch": "master", "commit": "775f22b75a9826eabf69b0094dd1d51d619fe552" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "5255aa27c422de944791318024167ad5d40aad20" },
|
||||
"ui": { "branch": "v3.0", "commit": "cb75908a86720172594b30de147272c1b3a7f452" },
|
||||
"vim-be-good": { "branch": "master", "commit": "0ae3de14eb8efc6effe7704b5e46495e91931cc5" },
|
||||
"vim-visual-multi": { "branch": "master", "commit": "a6975e7c1ee157615bbc80fc25e4392f71c344d4" },
|
||||
"vimtex": { "branch": "master", "commit": "82d2305ff71dfb3bd91602534cc9bb9a195bcb38" },
|
||||
"volt": { "branch": "main", "commit": "620de1321f275ec9d80028c68d1b88b409c0c8b1" },
|
||||
"which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" }
|
||||
}
|
||||
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 = "radium",
|
||||
|
||||
-- hl_override = {
|
||||
-- Comment = { italic = true },
|
||||
-- ["@comment"] = { italic = true },
|
||||
-- },
|
||||
}
|
||||
|
||||
-- M.nvdash = { load_on_startup = true }
|
||||
-- M.ui = {
|
||||
-- tabufline = {
|
||||
-- lazyload = false
|
||||
-- }
|
||||
-- }
|
||||
|
||||
return M
|
||||
14
lua/configs/conform.lua
Normal file
14
lua/configs/conform.lua
Normal file
@@ -0,0 +1,14 @@
|
||||
local options = {
|
||||
formatters_by_ft = {
|
||||
lua = { "stylua" },
|
||||
css = { "prettier" },
|
||||
html = { "prettier" },
|
||||
},
|
||||
|
||||
format_on_save = {
|
||||
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",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
15
lua/configs/lspconfig.lua
Normal file
15
lua/configs/lspconfig.lua
Normal file
@@ -0,0 +1,15 @@
|
||||
require("nvchad.configs.lspconfig").defaults()
|
||||
|
||||
local servers = {
|
||||
"html",
|
||||
"cssls",
|
||||
"clangd",
|
||||
"ts_ls",
|
||||
"jsonls",
|
||||
"rust_analyzer",
|
||||
"eslint",
|
||||
"svelte",
|
||||
"tailwindcss",
|
||||
"texlab",
|
||||
}
|
||||
vim.lsp.enable(servers)
|
||||
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>")
|
||||
12
lua/options.lua
Normal file
12
lua/options.lua
Normal file
@@ -0,0 +1,12 @@
|
||||
require "nvchad.options"
|
||||
|
||||
vim.opt.colorcolumn = "80"
|
||||
vim.wo.relativenumber = true
|
||||
|
||||
vim.opt.spell = true
|
||||
vim.opt.spelllang = { "en_us", "cs" }
|
||||
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
pattern = "java",
|
||||
command = "setlocal tabstop=4 shiftwidth=4 expandtab"
|
||||
})
|
||||
148
lua/plugins/init.lua
Normal file
148
lua/plugins/init.lua
Normal file
@@ -0,0 +1,148 @@
|
||||
return {
|
||||
{
|
||||
"stevearc/conform.nvim",
|
||||
event = "BufWritePre",
|
||||
opts = require "configs.conform",
|
||||
},
|
||||
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
config = function()
|
||||
require "configs.lspconfig"
|
||||
end,
|
||||
},
|
||||
|
||||
{ import = "nvchad.blink.lazyspec" },
|
||||
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
opts = {
|
||||
ensure_installed = {
|
||||
"vim",
|
||||
"lua",
|
||||
"vimdoc",
|
||||
"html",
|
||||
"css",
|
||||
"tsx",
|
||||
"jsx",
|
||||
"rust",
|
||||
"vue",
|
||||
"svelte",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
"windwp/nvim-ts-autotag",
|
||||
lazy = false,
|
||||
config = function()
|
||||
require("nvim-ts-autotag").setup {
|
||||
opts = {
|
||||
enable_close = true,
|
||||
enable_rename = true,
|
||||
enable_close_on_slash = false,
|
||||
},
|
||||
}
|
||||
end,
|
||||
},
|
||||
{
|
||||
"NeogitOrg/neogit",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim", -- required
|
||||
"nvim-telescope/telescope.nvim", -- optional
|
||||
"sindrets/diffview.nvim", -- optional
|
||||
"ibhagwan/fzf-lua", -- optional
|
||||
},
|
||||
config = true,
|
||||
lazy = false,
|
||||
},
|
||||
{
|
||||
"iamcco/markdown-preview.nvim",
|
||||
cmd = { "MarkdownPreviewToggle", "MarkdownPreview", "MarkdownPreviewStop" },
|
||||
build = "cd app && yarn install",
|
||||
init = function()
|
||||
vim.g.mkdp_filetypes = { "markdown" }
|
||||
|
||||
vim.api.nvim_set_keymap("n", "<leader>mp", ":MarkdownPreview<CR>", { noremap = true, silent = true })
|
||||
vim.api.nvim_set_keymap("n", "<leader>ms", ":MarkdownPreviewStop<CR>", { noremap = true, silent = true })
|
||||
vim.api.nvim_set_keymap("n", "<leader>gl", ":Neogit<CR>", { noremap = true, silent = true })
|
||||
end,
|
||||
ft = { "markdown" },
|
||||
},
|
||||
{
|
||||
"mg979/vim-visual-multi",
|
||||
lazy = false,
|
||||
},
|
||||
{
|
||||
"sourcegraph/sg.nvim",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
},
|
||||
build = "nvim -l build/init.lua",
|
||||
lazy = false,
|
||||
},
|
||||
|
||||
{
|
||||
"ThePrimeagen/vim-be-good",
|
||||
lazy = false,
|
||||
},
|
||||
{
|
||||
"andweeb/presence.nvim",
|
||||
lazy = false,
|
||||
config = function()
|
||||
require("presence").setup {
|
||||
-- General options
|
||||
auto_update = true,
|
||||
neovim_image_text = "The One True Text Editor",
|
||||
main_image = "neovim",
|
||||
log_level = nil,
|
||||
debounce_timeout = 10,
|
||||
enable_line_number = false,
|
||||
blacklist = {},
|
||||
buttons = true,
|
||||
file_assets = {},
|
||||
show_time = true,
|
||||
|
||||
-- Rich Presence text options
|
||||
editing_text = "Editing %s",
|
||||
file_explorer_text = "Browsing %s",
|
||||
git_commit_text = "Committing changes",
|
||||
plugin_manager_text = "Managing plugins",
|
||||
reading_text = "Reading %s",
|
||||
workspace_text = "Working on %s",
|
||||
line_number_text = "Line %s out of %s",
|
||||
}
|
||||
end,
|
||||
},
|
||||
|
||||
{
|
||||
"lervag/vimtex",
|
||||
lazy = false,
|
||||
init = function()
|
||||
vim.g.vimtex_view_method = "zathura_simple"
|
||||
|
||||
vim.g.vimtex_compiler_latexmk = {
|
||||
out_dir = "build",
|
||||
options = {
|
||||
"-pdf",
|
||||
"-shell-escape",
|
||||
"-verbose",
|
||||
"-file-line-error",
|
||||
"-synctex=1",
|
||||
},
|
||||
}
|
||||
|
||||
-- Mappings
|
||||
local km = vim.keymap.set
|
||||
km("n", "<localleader>ll", vim.cmd.VimtexCompile, { desc = "VimtexCompile" })
|
||||
km("n", "<localleader>lv", vim.cmd.VimtexView, { desc = "VimtexView" })
|
||||
km("n", "<localleader>lc", vim.cmd.VimtexCompileSS, { desc = "VimtexCompileSS" })
|
||||
km("n", "<localleader>le", vim.cmd.VimtexErrors, { desc = "VimtexErrors" })
|
||||
km("n", "<localleader>lo", vim.cmd.VimtexOutput, { desc = "VimtexOutput" })
|
||||
km("n", "<localleader>ls", vim.cmd.VimtexStop, { desc = "VimtexStop" })
|
||||
km("n", "<localleader>lS", vim.cmd.VimtexStopAll, { desc = "VimtexStopAll" })
|
||||
km("n", "<localleader>li", vim.cmd.VimtexInfo, { desc = "VimtexInfo" })
|
||||
km("n", "<localleader>lT", vim.cmd.VimtexTocOpen, { desc = "VimtexTocOpen" })
|
||||
end,
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user