Compare commits

..

No commits in common. "b7a163e232524f1024a59a0a5c6ddf123530085c" and "85b9f5686991a8b98c4980747f484ce155c959d0" have entirely different histories.

6 changed files with 129 additions and 21 deletions

View File

@ -2,8 +2,12 @@ dofile(vim.g.base46_cache .. "git")
local options = { local options = {
signs = { signs = {
add = { text = "" },
change = { text = "" },
delete = { text = "󰍵" }, delete = { text = "󰍵" },
changedelete = { text = "󱕖" }, topdelete = { text = "" },
changedelete = { text = "~" },
untracked = { text = "" },
}, },
on_attach = function(bufnr) on_attach = function(bufnr)

View File

@ -57,7 +57,7 @@ M.capabilities.textDocument.completion.completionItem = {
M.defaults = function() M.defaults = function()
dofile(vim.g.base46_cache .. "lsp") dofile(vim.g.base46_cache .. "lsp")
require("nvchad.lsp").diagnostic_config() require ("nvchad.lsp").diagnostic_config()
require("lspconfig").lua_ls.setup { require("lspconfig").lua_ls.setup {
on_attach = M.on_attach, on_attach = M.on_attach,
@ -75,7 +75,6 @@ M.defaults = function()
vim.fn.expand "$VIMRUNTIME/lua/vim/lsp", vim.fn.expand "$VIMRUNTIME/lua/vim/lsp",
vim.fn.stdpath "data" .. "/lazy/ui/nvchad_types", vim.fn.stdpath "data" .. "/lazy/ui/nvchad_types",
vim.fn.stdpath "data" .. "/lazy/lazy.nvim/lua/lazy", vim.fn.stdpath "data" .. "/lazy/lazy.nvim/lua/lazy",
"${3rd}/luv/library",
}, },
maxPreload = 100000, maxPreload = 100000,
preloadFileSize = 10000, preloadFileSize = 10000,

View File

@ -1,33 +1,75 @@
dofile(vim.g.base46_cache .. "nvimtree") dofile(vim.g.base46_cache .. "nvimtree")
local options = { local options = {
filters = { dotfiles = false }, filters = {
dotfiles = false,
},
disable_netrw = true, disable_netrw = true,
hijack_netrw = true,
hijack_cursor = true, hijack_cursor = true,
hijack_unnamed_buffer_when_opening = false,
sync_root_with_cwd = true, sync_root_with_cwd = true,
update_focused_file = { update_focused_file = {
enable = true, enable = true,
update_root = false, update_root = false,
}, },
view = { view = {
adaptive_size = false,
side = "left",
width = 30, width = 30,
preserve_window_proportions = true, preserve_window_proportions = true,
}, },
git = {
enable = true,
ignore = true,
},
filesystem_watchers = {
enable = true,
},
actions = {
open_file = {
resize_window = true,
},
},
renderer = { renderer = {
root_folder_label = false, root_folder_label = false,
highlight_git = true, highlight_git = true,
indent_markers = { enable = true }, highlight_opened_files = "none",
indent_markers = {
enable = true,
},
icons = { icons = {
show = {
file = true,
folder = true,
folder_arrow = true,
git = true,
},
glyphs = { glyphs = {
default = "󰈚", default = "󰈚",
symlink = "",
folder = { folder = {
default = "", default = "",
empty = "", empty = "",
empty_open = "", empty_open = "",
open = "", open = "",
symlink = "", symlink = "",
symlink_open = "",
arrow_open = "",
arrow_closed = "",
},
git = {
unstaged = "",
staged = "",
unmerged = "",
renamed = "",
untracked = "",
deleted = "",
ignored = "",
}, },
git = { unmerged = "" },
}, },
}, },
}, },

View File

@ -2,18 +2,50 @@ dofile(vim.g.base46_cache .. "telescope")
local options = { local options = {
defaults = { defaults = {
vimgrep_arguments = {
"rg",
"-L",
"--color=never",
"--no-heading",
"--with-filename",
"--line-number",
"--column",
"--smart-case",
},
prompt_prefix = "", prompt_prefix = "",
selection_caret = " ", selection_caret = " ",
entry_prefix = " ", entry_prefix = " ",
initial_mode = "insert",
selection_strategy = "reset",
sorting_strategy = "ascending", sorting_strategy = "ascending",
layout_strategy = "horizontal",
layout_config = { layout_config = {
horizontal = { horizontal = {
prompt_position = "top", prompt_position = "top",
preview_width = 0.55, preview_width = 0.55,
results_width = 0.8,
},
vertical = {
mirror = false,
}, },
width = 0.87, width = 0.87,
height = 0.80, height = 0.80,
preview_cutoff = 120,
}, },
file_sorter = require("telescope.sorters").get_fuzzy_file,
file_ignore_patterns = { "node_modules" },
generic_sorter = require("telescope.sorters").get_generic_fuzzy_sorter,
path_display = { "truncate" },
winblend = 0,
border = {},
borderchars = { "", "", "", "", "", "", "", "" },
color_devicons = true,
set_env = { ["COLORTERM"] = "truecolor" }, -- default = nil,
file_previewer = require("telescope.previewers").vim_buffer_cat.new,
grep_previewer = require("telescope.previewers").vim_buffer_vimgrep.new,
qflist_previewer = require("telescope.previewers").vim_buffer_qflist.new,
-- Developer configurations: Not meant for general override
buffer_previewer_maker = require("telescope.previewers").buffer_previewer_maker,
mappings = { mappings = {
n = { ["q"] = require("telescope.actions").close }, n = { ["q"] = require("telescope.actions").close },
}, },

View File

@ -7,26 +7,26 @@ map("i", "<C-l>", "<Right>", { desc = "move right" })
map("i", "<C-j>", "<Down>", { desc = "move down" }) map("i", "<C-j>", "<Down>", { desc = "move down" })
map("i", "<C-k>", "<Up>", { desc = "move up" }) map("i", "<C-k>", "<Up>", { desc = "move up" })
map("n", "<Esc>", "<cmd>noh<CR>", { desc = "general clear highlights" })
map("n", "<C-h>", "<C-w>h", { desc = "switch window left" }) map("n", "<C-h>", "<C-w>h", { desc = "switch window left" })
map("n", "<C-l>", "<C-w>l", { desc = "switch window right" }) map("n", "<C-l>", "<C-w>l", { desc = "switch window right" })
map("n", "<C-j>", "<C-w>j", { desc = "switch window down" }) map("n", "<C-j>", "<C-w>j", { desc = "switch window down" })
map("n", "<C-k>", "<C-w>k", { desc = "switch window up" }) map("n", "<C-k>", "<C-w>k", { desc = "switch window up" })
map("n", "<Esc>", "<cmd>noh<CR>", { desc = "General Clear highlights" }) map("n", "<C-s>", "<cmd>w<CR>", { desc = "file save" })
map("n", "<C-c>", "<cmd>%y+<CR>", { desc = "file copy whole" })
map("n", "<C-s>", "<cmd>w<CR>", { desc = "General Save file" }) map("n", "<leader>n", "<cmd>set nu!<CR>", { desc = "toggle line number" })
map("n", "<C-c>", "<cmd>%y+<CR>", { desc = "General Copy whole file" }) map("n", "<leader>rn", "<cmd>set rnu!<CR>", { desc = "toggle relative number" })
map("n", "<leader>ch", "<cmd>NvCheatsheet<CR>", { desc = "toggle nvcheatsheet" })
map("n", "<leader>n", "<cmd>set nu!<CR>", { desc = "Toggle line number" })
map("n", "<leader>rn", "<cmd>set rnu!<CR>", { desc = "Toggle relative number" })
map("n", "<leader>ch", "<cmd>NvCheatsheet<CR>", { desc = "Toggle nvcheatsheet" })
map("n", "<leader>fm", function() map("n", "<leader>fm", function()
require("conform").format { lsp_fallback = true } require("conform").format { lsp_fallback = true }
end, { desc = "General Format file" }) end, { desc = "format files" })
-- global lsp mappings -- global lsp mappings
map("n", "<leader>ds", vim.diagnostic.setloclist, { desc = "LSP Diagnostic loclist" }) map("n", "<leader>ds", vim.diagnostic.setloclist, { desc = "lsp diagnostic loclist" })
-- tabufline -- tabufline
map("n", "<leader>b", "<cmd>enew<CR>", { desc = "buffer new" }) map("n", "<leader>b", "<cmd>enew<CR>", { desc = "buffer new" })
@ -44,8 +44,8 @@ map("n", "<leader>x", function()
end, { desc = "buffer close" }) end, { desc = "buffer close" })
-- Comment -- Comment
map("n", "<leader>/", "gcc", { desc = "Toggle Comment", remap = true }) map("n", "<leader>/", "gcc", { desc = "comment toggle", remap = true })
map("v", "<leader>/", "gc", { desc = "Toggle comment", remap = true }) map("v", "<leader>/", "gc", { desc = "comment toggle", remap = true })
-- nvimtree -- nvimtree
map("n", "<C-n>", "<cmd>NvimTreeToggle<CR>", { desc = "nvimtree toggle window" }) map("n", "<C-n>", "<cmd>NvimTreeToggle<CR>", { desc = "nvimtree toggle window" })

View File

@ -1,8 +1,8 @@
return { return {
"nvim-lua/plenary.nvim",
{ {
"NvChad/base46", "NvChad/base46",
branch = "v2.5",
build = function() build = function()
require("base46").load_all_highlights() require("base46").load_all_highlights()
end, end,
@ -10,15 +10,25 @@ return {
{ {
"NvChad/ui", "NvChad/ui",
branch = "v2.5",
lazy = false, lazy = false,
build = function()
dofile(vim.fn.stdpath "data" .. "/lazy/ui/lua/nvchad_feedback.lua")()
end,
config = function()
require "nvchad"
end,
}, },
{ {
"nvim-tree/nvim-web-devicons", "nvim-tree/nvim-web-devicons",
opts = function() opts = function()
dofile(vim.g.base46_cache .. "devicons")
return { override = require "nvchad.icons.devicons" } return { override = require "nvchad.icons.devicons" }
end, end,
config = function(_, opts)
dofile(vim.g.base46_cache .. "devicons")
require("nvim-web-devicons").setup(opts)
end,
}, },
{ {
@ -46,6 +56,9 @@ return {
opts = function() opts = function()
return require "nvchad.configs.nvimtree" return require "nvchad.configs.nvimtree"
end, end,
config = function(_, opts)
require("nvim-tree").setup(opts)
end,
}, },
{ {
@ -58,6 +71,8 @@ return {
end, end,
}, },
"nvim-lua/plenary.nvim",
-- formatting! -- formatting!
{ {
"stevearc/conform.nvim", "stevearc/conform.nvim",
@ -66,6 +81,9 @@ return {
lua = { "stylua" }, lua = { "stylua" },
}, },
}, },
config = function(_, opts)
require("conform").setup(opts)
end,
}, },
-- git stuff -- git stuff
@ -75,6 +93,9 @@ return {
opts = function() opts = function()
return require "nvchad.configs.gitsigns" return require "nvchad.configs.gitsigns"
end, end,
config = function(_, opts)
require("gitsigns").setup(opts)
end,
}, },
-- lsp stuff -- lsp stuff
@ -84,6 +105,13 @@ return {
opts = function() opts = function()
return require "nvchad.configs.mason" return require "nvchad.configs.mason"
end, end,
config = function(_, opts)
require("mason").setup(opts)
vim.api.nvim_create_user_command("MasonInstallAll", function()
require("nvchad.mason").install_all(opts.ensure_installed)
end, {})
end,
}, },
{ {
@ -138,6 +166,9 @@ return {
opts = function() opts = function()
return require "nvchad.configs.cmp" return require "nvchad.configs.cmp"
end, end,
config = function(_, opts)
require("cmp").setup(opts)
end,
}, },
{ {