forked from NvChad/NvChad
-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
51 changed files
with
286 additions
and
1,967 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1 @@ | ||
plugin | ||
spell | ||
ftplugin | ||
syntax | ||
coc-settings.json | ||
.luarc.json | ||
after | ||
**/.DS_Store |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,39 @@ | ||
require "core" | ||
vim.g.base46_cache = vim.fn.stdpath "data" .. "/nvchad/base46/" | ||
vim.g.mapleader = " " | ||
|
||
local custom_init_path = vim.api.nvim_get_runtime_file("lua/custom/init.lua", false)[1] | ||
-- bootstrap lazy and all plugins | ||
local lazypath = vim.fn.stdpath "data" .. "/lazy/lazy.nvim" | ||
|
||
if custom_init_path then | ||
dofile(custom_init_path) | ||
if not vim.loop.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 | ||
|
||
require("core.utils").load_mappings() | ||
vim.opt.rtp:prepend(lazypath) | ||
|
||
local lazypath = vim.fn.stdpath "data" .. "/lazy/lazy.nvim" | ||
local lazy_config = require "configs.lazy" | ||
|
||
-- bootstrap lazy.nvim! | ||
if not vim.loop.fs_stat(lazypath) then | ||
require("core.bootstrap").gen_chadrc_template() | ||
require("core.bootstrap").lazy(lazypath) | ||
end | ||
-- load plugins | ||
require("lazy").setup({ | ||
{ | ||
"NvChad/NvChad", | ||
lazy = false, | ||
branch = "v2.5", | ||
import = "nvchad.plugins", | ||
config = function() | ||
require "options" | ||
end, | ||
}, | ||
|
||
{ import = "plugins" }, | ||
}, lazy_config) | ||
|
||
-- load theme | ||
dofile(vim.g.base46_cache .. "defaults") | ||
vim.opt.rtp:prepend(lazypath) | ||
require "plugins" | ||
dofile(vim.g.base46_cache .. "statusline") | ||
|
||
require "nvchad.autocmds" | ||
|
||
vim.schedule(function() | ||
require "mappings" | ||
end) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,37 @@ | ||
{ | ||
"Comment.nvim": { "branch": "master", "commit": "0236521ea582747b58869cb72f70ccfa967d2e89" }, | ||
"LuaSnip": { "branch": "master", "commit": "be7be2ca7f55bb881a7ffc16b2efa5af034ab06b" }, | ||
"base46": { "branch": "v2.0", "commit": "36a44bf1c712a42b46479540ee89e296c6c63cdc" }, | ||
"NvChad": { "branch": "v2.5", "commit": "0b1f669caa312ca11be79b3833296d1271bf4c75" }, | ||
"base46": { "branch": "v2.5", "commit": "adb64a6ae70f8c61c5ab8892f07d29dafd4d47ad" }, | ||
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, | ||
"cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" }, | ||
"cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" }, | ||
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, | ||
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, | ||
"conform.nvim": { "branch": "master", "commit": "820eec990d5f332d30cf939954c8672a43a0459e" }, | ||
"copilot-cmp": { "branch": "master", "commit": "72fbaa03695779f8349be3ac54fa8bd77eed3ee3" }, | ||
"copilot.lua": { "branch": "master", "commit": "f7612f5af4a7d7615babf43ab1e67a2d790c13a6" }, | ||
"friendly-snippets": { "branch": "main", "commit": "ea068f1becd91bcd4591fceb6420d4335e2e14d3" }, | ||
"gitsigns.nvim": { "branch": "main", "commit": "1a50b94066def8591d5f65bd60a4233902e9def4" }, | ||
"indent-blankline.nvim": { "branch": "master", "commit": "b7aa0aed55887edfaece23f7b46ab22232fc8741" }, | ||
"gitsigns.nvim": { "branch": "main", "commit": "d96ef3bbff0bdbc3916a220f5c74a04c4db033f2" }, | ||
"indent-blankline.nvim": { "branch": "master", "commit": "3d08501caef2329aba5121b753e903904088f7e6" }, | ||
"lazy.nvim": { "branch": "main", "commit": "31ddbea7c10b6920c9077b66c97951ca8682d5c8" }, | ||
"markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" }, | ||
"mason.nvim": { "branch": "main", "commit": "751b1fcbf3d3b783fcf8d48865264a9bcd8f9b10" }, | ||
"none-ls.nvim": { "branch": "main", "commit": "dca7ddec321a102ec9e792b1b29193702aff5fbb" }, | ||
"nvim-autopairs": { "branch": "master", "commit": "4f41e5940bc0443fdbe5f995e2a596847215cd2a" }, | ||
"nvim-cmp": { "branch": "main", "commit": "ce16de5665c766f39c271705b17fff06f7bcb84f" }, | ||
"nvim-colorizer.lua": { "branch": "master", "commit": "85855b38011114929f4058efc97af1059ab3e41d" }, | ||
"nvim-dap": { "branch": "master", "commit": "405df1dcc2e395ab5173a9c3d00e03942c023074" }, | ||
"nvim-dap-go": { "branch": "main", "commit": "36abe1d320cb61bfdf094d4e0fe815ef58f2302a" }, | ||
"nvim-dap-python": { "branch": "master", "commit": "66560f0ebddf96604f7037e1efad3ba6942761e6" }, | ||
"nvim-dap-python": { "branch": "master", "commit": "3dffa58541d1f52c121fe58ced046268c838d802" }, | ||
"nvim-dap-ui": { "branch": "master", "commit": "edfa93f60b189e5952c016eee262d0685d838450" }, | ||
"nvim-lspconfig": { "branch": "master", "commit": "b94a4c2ff309e232cfacdf8fc7658bd93919a770" }, | ||
"nvim-lint": { "branch": "master", "commit": "4055dc856d5ac8f6b85748006fd8fa6457e086e8" }, | ||
"nvim-lspconfig": { "branch": "master", "commit": "9266dc26862d8f3556c2ca77602e811472b4c5b8" }, | ||
"nvim-nio": { "branch": "master", "commit": "5800f585def265d52f1d8848133217c800bcb25d" }, | ||
"nvim-tree.lua": { "branch": "master", "commit": "81eb8d519233c105f30dc0a278607e62b20502fd" }, | ||
"nvim-treesitter": { "branch": "master", "commit": "e9321bb914b3a5a88b7dff5392f0f5f8d83bee67" }, | ||
"nvim-web-devicons": { "branch": "master", "commit": "fd4abfc5237246670977972c6f518186b621a32d" }, | ||
"nvterm": { "branch": "main", "commit": "9d7ba3b6e368243175d38e1ec956e0476fd86ed9" }, | ||
"nvim-treesitter": { "branch": "master", "commit": "2a95ff14764af20d32ec1edb27e11c38a84b9478" }, | ||
"nvim-web-devicons": { "branch": "master", "commit": "b3468391470034353f0e5110c70babb5c62967d3" }, | ||
"plenary.nvim": { "branch": "master", "commit": "8aad4396840be7fc42896e3011751b7609ca4119" }, | ||
"telescope.nvim": { "branch": "master", "commit": "d26b666b45e5dde23332e4bde1227677f2d92e31" }, | ||
"ui": { "branch": "v2.0", "commit": "7b3225264af17a9e0aff0b4fd2a0fac90b73db53" }, | ||
"telescope.nvim": { "branch": "master", "commit": "4d4ade7f2b8f403e8816ca50c05ed16e259b21fb" }, | ||
"ui": { "branch": "v2.5", "commit": "e1af69426b3c4b55c88bd1c81790c1c73b30bfa8" }, | ||
"which-key.nvim": { "branch": "main", "commit": "4433e5ec9a507e5097571ed55c02ea9658fb268a" } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,31 @@ | ||
---@type ChadrcConfig | ||
local M = {} | ||
|
||
local function LSP_status() | ||
local function lsp() | ||
if rawget(vim, "lsp") then | ||
for _, client in ipairs(vim.lsp.get_active_clients()) do | ||
local stbufnr = vim.api.nvim_win_get_buf(vim.g.statusline_winid) | ||
|
||
-- ignore copilot and null-ls clients | ||
if client.attached_buffers[stbufnr] and client.name ~= "copilot" and client.name ~= "null-ls" then | ||
-- ignore copilot | ||
if client.attached_buffers[stbufnr] and client.name ~= "copilot" then | ||
return (vim.o.columns > 100 and "%#St_LspStatus#" .. " LSP ~ " .. client.name .. " ") or " LSP " | ||
end | ||
end | ||
end | ||
end | ||
|
||
M.ui = { | ||
theme = "everforest", | ||
theme = "everforest_light", | ||
tabufline = { | ||
overriden_modules = function(modules) | ||
table.remove(modules, 4) | ||
end, | ||
order = { "treeOffset", "buffers", "tabs" }, | ||
}, | ||
statusline = { | ||
theme = "minimal", | ||
separator_style = "block", | ||
overriden_modules = function(modules) | ||
modules[8] = LSP_status() or "" | ||
end, | ||
modules = { | ||
lsp = lsp, | ||
}, | ||
}, | ||
} | ||
|
||
M.plugins = "custom.plugins" | ||
M.mappings = require "custom.mappings" | ||
|
||
return M |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
local options = { | ||
formatters_by_ft = { | ||
c = { "clangd-format" }, | ||
cpp = { "clangd-format" }, | ||
css = { "prettier" }, | ||
go = { "goimports", "gofmt" }, | ||
graphql = { "prettier" }, | ||
html = { "prettier" }, | ||
javascript = { "prettier" }, | ||
javascriptreact = { "prettier" }, | ||
json = { "prettier" }, | ||
lua = { "stylua" }, | ||
markdown = { "prettier" }, | ||
python = { "isort", "black" }, | ||
scss = { "prettier" }, | ||
sh = { "shfmt" }, | ||
ruby = { "rubocop" }, | ||
terraform = { "terraform_fmt" }, | ||
toml = { "taplo" }, | ||
typescript = { "prettier" }, | ||
typercriptreact = { "prettier" }, | ||
yaml = { "prettier" }, | ||
zsh = { "shfmt" }, | ||
}, | ||
|
||
format_on_save = { | ||
lsp_fallback = true, | ||
async = false, | ||
timeout_ms = 500, | ||
}, | ||
} | ||
|
||
require("conform").setup(options) |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
local lint = require "lint" | ||
|
||
lint.linters_by_ft = { | ||
go = { "golangcilint" }, | ||
markdown = { "markdownlint" }, | ||
python = { "pylint" }, | ||
ruby = { "rubocop" }, | ||
terraform = { "tflint" }, | ||
} | ||
|
||
local lint_augroup = vim.api.nvim_create_augroup("lint", { clear = true }) | ||
vim.api.nvim_create_autocmd({ "BufEnter", "BufWritePost", "InsertLeave", "TextChanged" }, { | ||
group = lint_augroup, | ||
callback = function() | ||
lint.try_lint() | ||
end, | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.