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 = {
signs = {
add = { text = "" },
change = { text = "" },
delete = { text = "󰍵" },
changedelete = { text = "󱕖" },
topdelete = { text = "" },
changedelete = { text = "~" },
untracked = { text = "" },
},
on_attach = function(bufnr)

View File

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

View File

@ -1,33 +1,75 @@
dofile(vim.g.base46_cache .. "nvimtree")
local options = {
filters = { dotfiles = false },
filters = {
dotfiles = false,
},
disable_netrw = true,
hijack_netrw = true,
hijack_cursor = true,
hijack_unnamed_buffer_when_opening = false,
sync_root_with_cwd = true,
update_focused_file = {
enable = true,
update_root = false,
},
view = {
adaptive_size = false,
side = "left",
width = 30,
preserve_window_proportions = true,
},
git = {
enable = true,
ignore = true,
},
filesystem_watchers = {
enable = true,
},
actions = {
open_file = {
resize_window = true,
},
},
renderer = {
root_folder_label = false,
highlight_git = true,
indent_markers = { enable = true },
highlight_opened_files = "none",
indent_markers = {
enable = true,
},
icons = {
show = {
file = true,
folder = true,
folder_arrow = true,
git = true,
},
glyphs = {
default = "󰈚",
symlink = "",
folder = {
default = "",
empty = "",
empty_open = "",
open = "",
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 = {
defaults = {
vimgrep_arguments = {
"rg",
"-L",
"--color=never",
"--no-heading",
"--with-filename",
"--line-number",
"--column",
"--smart-case",
},
prompt_prefix = "",
selection_caret = " ",
entry_prefix = " ",
selection_caret = " ",
entry_prefix = " ",
initial_mode = "insert",
selection_strategy = "reset",
sorting_strategy = "ascending",
layout_strategy = "horizontal",
layout_config = {
horizontal = {
prompt_position = "top",
preview_width = 0.55,
results_width = 0.8,
},
vertical = {
mirror = false,
},
width = 0.87,
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 = {
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-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-l>", "<C-w>l", { desc = "switch window right" })
map("n", "<C-j>", "<C-w>j", { desc = "switch window down" })
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", "<C-c>", "<cmd>%y+<CR>", { desc = "General Copy whole file" })
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>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()
require("conform").format { lsp_fallback = true }
end, { desc = "General Format file" })
end, { desc = "format files" })
-- 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
map("n", "<leader>b", "<cmd>enew<CR>", { desc = "buffer new" })
@ -44,8 +44,8 @@ map("n", "<leader>x", function()
end, { desc = "buffer close" })
-- Comment
map("n", "<leader>/", "gcc", { desc = "Toggle Comment", remap = true })
map("v", "<leader>/", "gc", { desc = "Toggle comment", remap = true })
map("n", "<leader>/", "gcc", { desc = "comment toggle", remap = true })
map("v", "<leader>/", "gc", { desc = "comment toggle", remap = true })
-- nvimtree
map("n", "<C-n>", "<cmd>NvimTreeToggle<CR>", { desc = "nvimtree toggle window" })

View File

@ -1,8 +1,8 @@
return {
"nvim-lua/plenary.nvim",
{
"NvChad/base46",
branch = "v2.5",
build = function()
require("base46").load_all_highlights()
end,
@ -10,15 +10,25 @@ return {
{
"NvChad/ui",
branch = "v2.5",
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",
opts = function()
dofile(vim.g.base46_cache .. "devicons")
return { override = require "nvchad.icons.devicons" }
end,
config = function(_, opts)
dofile(vim.g.base46_cache .. "devicons")
require("nvim-web-devicons").setup(opts)
end,
},
{
@ -46,6 +56,9 @@ return {
opts = function()
return require "nvchad.configs.nvimtree"
end,
config = function(_, opts)
require("nvim-tree").setup(opts)
end,
},
{
@ -58,6 +71,8 @@ return {
end,
},
"nvim-lua/plenary.nvim",
-- formatting!
{
"stevearc/conform.nvim",
@ -66,6 +81,9 @@ return {
lua = { "stylua" },
},
},
config = function(_, opts)
require("conform").setup(opts)
end,
},
-- git stuff
@ -75,6 +93,9 @@ return {
opts = function()
return require "nvchad.configs.gitsigns"
end,
config = function(_, opts)
require("gitsigns").setup(opts)
end,
},
-- lsp stuff
@ -84,6 +105,13 @@ return {
opts = function()
return require "nvchad.configs.mason"
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()
return require "nvchad.configs.cmp"
end,
config = function(_, opts)
require("cmp").setup(opts)
end,
},
{