Update config / Update nvui to 3.0
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
-- This file needs to have same structure as nvconfig.lua
|
||||
-- https://github.com/NvChad/ui/blob/v2.5/lua/nvconfig.lua
|
||||
-- https://github.com/NvChad/ui/blob/v3.0/lua/nvconfig.lua
|
||||
|
||||
---@type ChadrcConfig
|
||||
local M = {}
|
||||
@@ -95,39 +95,48 @@ M.ui = {
|
||||
theme = "vscode_colored",
|
||||
},
|
||||
|
||||
nvdash = {
|
||||
load_on_startup = true,
|
||||
header = {
|
||||
" ▄▄ ▄ ▄▄▄▄▄▄▄ ",
|
||||
"▄▀███▄ ▄██ █████▀ ",
|
||||
"██▄▀███▄ ███ ",
|
||||
"███ ▀███▄ ███ ",
|
||||
"███ ▀██ ███ ",
|
||||
"███ ▀ ███ ",
|
||||
"▀██ █████▄▀█▀▄██████▄ ",
|
||||
" ▀ ▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀ ",
|
||||
},
|
||||
buttons = {
|
||||
{ " Projects", "Spc f p", "Telescope projects" },
|
||||
{ " Find File", "Spc f f", "Telescope find_files" },
|
||||
{ " Recent Files", "Spc f o", "Telescope oldfiles" },
|
||||
{ " Find Word", "Spc f w", "Telescope live_grep" },
|
||||
{ " Bookmarks", "Spc m a", "Telescope marks" },
|
||||
cmp = {
|
||||
style="atom_colored"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
M.nvdash = {
|
||||
load_on_startup = true,
|
||||
buttons = {
|
||||
{ txt = " Projects", keys = "Spc f p", cmd = "Telescope projects" },
|
||||
{ txt = " Find File", keys = "Spc f f", cmd = "Telescope find_files" },
|
||||
{ txt = " Recent Files", keys = "Spc f o", cmd = "Telescope oldfiles" },
|
||||
{ txt = " Find Word", keys = "Spc f w", cmd = "Telescope live_grep" },
|
||||
{ txt = " Bookmarks", keys = "Spc m a", cmd = "Telescope marks" },
|
||||
{ txt = "─", hl = "NvDashLazy", no_gap = true, rep = true },
|
||||
|
||||
{
|
||||
txt = function()
|
||||
local stats = require("lazy").stats()
|
||||
local ms = math.floor(stats.startuptime) .. " ms"
|
||||
return " Loaded " .. stats.loaded .. "/" .. stats.count .. " plugins in " .. ms
|
||||
end,
|
||||
hl = "NvDashLazy",
|
||||
no_gap = true,
|
||||
},
|
||||
|
||||
{ txt = "─", hl = "NvDashLazy", no_gap = true, rep = true },
|
||||
},
|
||||
|
||||
}
|
||||
|
||||
M.term = {
|
||||
-- hl = "Normal:term,WinSeparator:WinSeparator",
|
||||
-- sizes = { sp = 0.3, vsp = 0.2 },
|
||||
float = {
|
||||
relative = "editor",
|
||||
row = 0.04,
|
||||
col = 0.045,
|
||||
width = 0.9,
|
||||
height = 0.8,
|
||||
border = "single",
|
||||
},
|
||||
-- hl = "Normal:term,WinSeparator:WinSeparator",
|
||||
-- sizes = { sp = 0.3, vsp = 0.2 },
|
||||
float = {
|
||||
relative = "editor",
|
||||
row = 0.04,
|
||||
col = 0.045,
|
||||
width = 0.9,
|
||||
height = 0.8,
|
||||
border = "single",
|
||||
},
|
||||
}
|
||||
|
||||
return M
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
local cmp_ui = require("nvconfig").ui.cmp
|
||||
|
||||
return {
|
||||
formatting = {
|
||||
-- default fields order i.e completion word + item.kind + item.kind icons
|
||||
fields = { "abbr", "kind" },
|
||||
|
||||
format = function(_, item)
|
||||
local icons = require "nvchad.icons.lspkind"
|
||||
local icon = (cmp_ui.icons and icons[item.kind]) or ""
|
||||
|
||||
icon = cmp_ui.lspkind_text and (" " .. icon .. " ") or icon
|
||||
item.kind = string.format("%s %s", icon, cmp_ui.lspkind_text and item.kind or "")
|
||||
|
||||
item.abbr = item.abbr:match "[^(]+"
|
||||
item.menu = ""
|
||||
return item
|
||||
end,
|
||||
},
|
||||
}
|
||||
@@ -2,7 +2,6 @@ require "nvchad.mappings"
|
||||
|
||||
local nomap = vim.keymap.del
|
||||
nomap("n", "<leader>x")
|
||||
nomap("n", "<leader>cc")
|
||||
nomap("n", "<leader>ch")
|
||||
nomap("n", "<leader>cm")
|
||||
nomap("n", "<leader>v")
|
||||
|
||||
@@ -2,8 +2,7 @@ return {
|
||||
"saecki/crates.nvim",
|
||||
tag = "stable",
|
||||
event = { "BufRead Cargo.toml" },
|
||||
config = function()
|
||||
require("crates").setup{
|
||||
opts = {
|
||||
lsp = {
|
||||
enabled = true,
|
||||
actions = true,
|
||||
@@ -18,5 +17,4 @@ return {
|
||||
},
|
||||
}
|
||||
}
|
||||
end,
|
||||
}
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
return {
|
||||
"chrisgrieser/nvim-lsp-endhints",
|
||||
event = "LspAttach",
|
||||
opts = {icons = {
|
||||
type = " ",
|
||||
},},}
|
||||
|
||||
event = "LspAttach",
|
||||
opts = {
|
||||
icons = {
|
||||
type = " ",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -5,16 +5,13 @@ return {
|
||||
},
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
config = function()
|
||||
require "configs.lspconfig"
|
||||
end,
|
||||
opts =
|
||||
require "configs.lspconfig"
|
||||
},
|
||||
{
|
||||
"Pocco81/auto-save.nvim",
|
||||
config = function()
|
||||
require("auto-save").setup()
|
||||
end,
|
||||
lazy = false,
|
||||
opts = {},
|
||||
event = { "BufEnter" },
|
||||
},
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
@@ -29,7 +26,6 @@ return {
|
||||
},
|
||||
{
|
||||
"hrsh7th/nvim-cmp",
|
||||
opts = require "configs.cmp",
|
||||
},
|
||||
{
|
||||
"3rd/image.nvim",
|
||||
@@ -40,6 +36,7 @@ return {
|
||||
package.path = package.path .. ";" .. vim.fn.expand "$HOME" .. "/.luarocks/share/lua/5.1/?/init.lua"
|
||||
package.path = package.path .. ";" .. vim.fn.expand "$HOME" .. "/.luarocks/share/lua/5.1/?.lua"
|
||||
end,
|
||||
ft = { "markdown", "" },
|
||||
ft = { "markdown" },
|
||||
event = { "BufRead *.png", "BufRead *.jpg", "BufRead *.jpeg", "BufRead *.gif", "BufRead *.wepb", "BufRead *.avif" },
|
||||
},
|
||||
}
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
return {
|
||||
"WhoIsSethDaniel/mason-tool-installer.nvim",
|
||||
lazy = false,
|
||||
config = function()
|
||||
require("mason-tool-installer").setup(require "configs.default-lsp")
|
||||
end,
|
||||
opts = require "configs.default-lsp"
|
||||
}
|
||||
|
||||
@@ -1,12 +1,9 @@
|
||||
return {
|
||||
"ahmedkhalf/project.nvim",
|
||||
lazy = false,
|
||||
config = function()
|
||||
require("telescope").load_extension "projects"
|
||||
require("project_nvim").setup {
|
||||
-- your configuration comes here
|
||||
-- or leave it empty to use the default settings
|
||||
-- refer to the configuration section below
|
||||
}
|
||||
end,
|
||||
}
|
||||
return {
|
||||
"ahmedkhalf/project.nvim",
|
||||
lazy = false,
|
||||
config = function()
|
||||
require("telescope").load_extension "projects"
|
||||
require("project_nvim").setup {
|
||||
}
|
||||
end,
|
||||
}
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
return {
|
||||
"kevinhwang91/nvim-ufo",
|
||||
config = function()
|
||||
require("ufo").setup {
|
||||
opts = {
|
||||
provider_selector = function(_, _, _)
|
||||
return { "treesitter", "indent" }
|
||||
end,
|
||||
}
|
||||
end,
|
||||
},
|
||||
lazy = false,
|
||||
dependencies = { "kevinhwang91/promise-async" },
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user