Compare commits
No commits in common. "56e6234363b065e72548b1a2877c71e32e84c08f" and "907b1125144cbbd7e64e9448132ee92743d13494" have entirely different histories.
56e6234363
...
907b112514
3
.github/README.md
vendored
3
.github/README.md
vendored
@ -89,8 +89,9 @@ A fuzzy file finder, picker, sorter, previewer and much more:
|
||||
- Many beautiful themes, theme toggler by our [base46 plugin](https://github.com/NvChad/base46)
|
||||
- Inbuilt terminal toggling & management with [Nvterm](https://github.com/NvChad/nvterm)
|
||||
- NvChad updater, hide & unhide terminal buffers with [NvChad extensions](https://github.com/NvChad/extensions)
|
||||
- Lightweight & performant ui plugin with [NvChad UI](https://github.com/NvChad/ui) It provides statusline modules, tabufline ( tabs + buffer manager) , beautiful cheatsheets and much more!
|
||||
- Lightweight & performant ui plugin with [NvChad UI](https://github.com/NvChad/ui)
|
||||
- File navigation with [nvim-tree.lua](https://github.com/kyazdani42/nvim-tree.lua)
|
||||
- Managing tabs, buffers with [bufferline.nvim](https://github.com/akinsho/bufferline.nvim)
|
||||
- Beautiful and configurable icons with [nvim-web-devicons](https://github.com/kyazdani42/nvim-web-devicons)
|
||||
- Git diffs and more with [gitsigns.nvim](https://github.com/lewis6991/gitsigns.nvim)
|
||||
- NeoVim Lsp configuration with [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig) and [mason.nvim](https://github.com/williamboman/mason.nvim)
|
||||
|
@ -25,9 +25,24 @@ M.lazy = function(install_path)
|
||||
|
||||
-- install plugins
|
||||
require "plugins"
|
||||
vim.api.nvim_buf_delete(0, { force = true }) -- close lazy window
|
||||
|
||||
-- mason packages & show post_boostrap screen
|
||||
require "nvchad.post_bootstrap"()
|
||||
---------- mason packages -------------
|
||||
vim.schedule(function()
|
||||
vim.cmd "MasonInstallAll"
|
||||
local packages = table.concat(vim.g.mason_binaries_list, " ")
|
||||
|
||||
require("mason-registry"):on("package:install:success", function(pkg)
|
||||
packages = string.gsub(packages, pkg.name:gsub("%-", "%%-"), "") -- rm package name
|
||||
|
||||
if packages:match "%S" == nil then
|
||||
vim.schedule(function()
|
||||
vim.api.nvim_buf_delete(0, { force = true })
|
||||
M.echo "Now please read the docs at nvchad.com!! "
|
||||
end)
|
||||
end
|
||||
end)
|
||||
end)
|
||||
end
|
||||
|
||||
M.gen_chadrc_template = function()
|
||||
@ -35,17 +50,15 @@ M.gen_chadrc_template = function()
|
||||
local path = vim.fn.stdpath "config" .. "/lua/custom/"
|
||||
local input = vim.fn.input "Do you want to install example custom config? (y/N) : "
|
||||
|
||||
-- clone example_config repo
|
||||
if input == "y" then
|
||||
M.echo "cloning example custom config repo ..."
|
||||
vim.fn.system { "git", "clone", "--depth", "1", "https://github.com/NvChad/example_config", path }
|
||||
vim.fn.delete(path .. ".git", "rf")
|
||||
else
|
||||
-- use very minimal chadrc
|
||||
vim.fn.mkdir(path, "p")
|
||||
|
||||
local file = io.open(path .. "chadrc.lua", "w")
|
||||
file:write "---@type ChadrcConfig \n local M = {}\n M.ui = {theme = 'onedark'}\n return M"
|
||||
file:write "local M = {}\n M.ui = {theme = 'onedark'}\n return M"
|
||||
file:close()
|
||||
end
|
||||
end
|
||||
|
@ -1,7 +1,12 @@
|
||||
-- Chadrc overrides this file
|
||||
|
||||
local M = {}
|
||||
|
||||
M.options = {
|
||||
nvchad_branch = "v2.0",
|
||||
nvChad = {
|
||||
update_url = "https://github.com/NvChad/NvChad",
|
||||
update_branch = "v2.0",
|
||||
},
|
||||
}
|
||||
|
||||
M.ui = {
|
||||
@ -13,10 +18,6 @@ M.ui = {
|
||||
theme_toggle = { "onedark", "one_light" },
|
||||
theme = "onedark", -- default theme
|
||||
transparency = false,
|
||||
lsp_semantic_tokens = false, -- needs nvim v0.9, just adds highlight groups for lsp semantic tokens
|
||||
|
||||
-- https://github.com/NvChad/base46/tree/v2.0/lua/base46/extended_integrations
|
||||
extended_integrations = {}, -- these aren't compiled by default, ex: "alpha", "notify"
|
||||
|
||||
-- cmp themeing
|
||||
cmp = {
|
||||
@ -27,7 +28,9 @@ M.ui = {
|
||||
selected_item_bg = "colored", -- colored / simple
|
||||
},
|
||||
|
||||
telescope = { style = "borderless" }, -- borderless / bordered
|
||||
telescope = {
|
||||
style = "borderless", -- borderless / bordered
|
||||
},
|
||||
|
||||
------------------------------- nvchad_ui modules -----------------------------
|
||||
statusline = {
|
||||
@ -72,7 +75,9 @@ M.ui = {
|
||||
},
|
||||
},
|
||||
|
||||
cheatsheet = { theme = "grid" }, -- simple/grid
|
||||
cheatsheet = {
|
||||
theme = "grid", -- simple/grid
|
||||
},
|
||||
|
||||
lsp = {
|
||||
-- show function signatures i.e args as you type
|
||||
@ -83,10 +88,11 @@ M.ui = {
|
||||
},
|
||||
}
|
||||
|
||||
M.plugins = "" -- path i.e "custom.plugins", so make custom/plugins.lua file
|
||||
M.plugins = "" -- path i.e "custom.plugins" -> custom/plugins.lua only and not custom/plugins/init.lua!!!!
|
||||
|
||||
M.lazy_nvim = require "plugins.configs.lazy_nvim" -- config for lazy.nvim startup options
|
||||
|
||||
-- these are default mappings, check core.mappings for table structure
|
||||
M.mappings = {}
|
||||
|
||||
return M
|
||||
|
@ -265,7 +265,6 @@ M.telescope = {
|
||||
["<leader>fb"] = { "<cmd> Telescope buffers <CR>", "find buffers" },
|
||||
["<leader>fh"] = { "<cmd> Telescope help_tags <CR>", "help page" },
|
||||
["<leader>fo"] = { "<cmd> Telescope oldfiles <CR>", "find oldfiles" },
|
||||
["<leader>fz"] = { "<cmd> Telescope current_buffer_fuzzy_find <CR>", "find in current buffer" },
|
||||
|
||||
-- git
|
||||
["<leader>cm"] = { "<cmd> Telescope git_commits <CR>", "git commits" },
|
||||
|
@ -52,7 +52,6 @@ M.remove_disabled_keys = function(chadrc_mappings, default_mappings)
|
||||
end
|
||||
|
||||
M.load_mappings = function(section, mapping_opt)
|
||||
vim.schedule(function()
|
||||
local function set_section_map(section_values)
|
||||
if section_values.plugin then
|
||||
return
|
||||
@ -84,7 +83,6 @@ M.load_mappings = function(section, mapping_opt)
|
||||
for _, sect in pairs(mappings) do
|
||||
set_section_map(sect)
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
M.lazy_load = function(plugin)
|
||||
|
@ -7,15 +7,14 @@ local utils = require "core.utils"
|
||||
-- export on_attach & capabilities for custom lspconfigs
|
||||
|
||||
M.on_attach = function(client, bufnr)
|
||||
client.server_capabilities.documentFormattingProvider = false
|
||||
client.server_capabilities.documentRangeFormattingProvider = false
|
||||
|
||||
utils.load_mappings("lspconfig", { buffer = bufnr })
|
||||
|
||||
if client.server_capabilities.signatureHelpProvider then
|
||||
require("nvchad_ui.signature").setup(client)
|
||||
end
|
||||
|
||||
if not utils.load_config().ui.lsp_semantic_tokens then
|
||||
client.server_capabilities.semanticTokensProvider = nil
|
||||
end
|
||||
end
|
||||
|
||||
M.capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||
|
@ -16,6 +16,7 @@ local options = {
|
||||
adaptive_size = false,
|
||||
side = "left",
|
||||
width = 30,
|
||||
hide_root_folder = true,
|
||||
preserve_window_proportions = true,
|
||||
},
|
||||
git = {
|
||||
@ -31,7 +32,6 @@ local options = {
|
||||
},
|
||||
},
|
||||
renderer = {
|
||||
root_folder_label = false,
|
||||
highlight_git = false,
|
||||
highlight_opened_files = "none",
|
||||
|
||||
|
@ -253,7 +253,7 @@ local default_plugins = {
|
||||
-- Only load whichkey after all the gui
|
||||
{
|
||||
"folke/which-key.nvim",
|
||||
keys = { "<leader>", '"', "'", "`", "c", "v" },
|
||||
keys = { "<leader>", '"', "'", "`" },
|
||||
init = function()
|
||||
require("core.utils").load_mappings "whichkey"
|
||||
end,
|
||||
|
Loading…
Reference in New Issue
Block a user