This commit is contained in:
Zacharias-Brohn
2025-02-15 01:10:18 +01:00
parent ceb03fada6
commit db5175472a
167 changed files with 744 additions and 3218 deletions
-42
View File
@@ -1,42 +0,0 @@
-- This file needs to have same structure as nvconfig.lua
-- https://github.com/NvChad/ui/blob/v3.0/lua/nvconfig.lua
-- Please read that file to know all available options :(
---@type ChadrcConfig
local M = {}
M.base46 = {
theme = "one_light",
theme_toggle = {
"one_light",
"one_light",
},
-- transparency = true,
changed_themes = {
one_light = {
base_16 = {
base0B = "#3b743b"
}
}
}
-- hl_override = {
-- Comment = { italic = true },
-- ["@comment"] = { italic = true },
-- },
}
M.ui = {
statusline = {
theme = "default",
separator_style = "round",
},
tabufline = {
enabled = true,
lazyload = false,
}
}
return M
+17
View File
@@ -0,0 +1,17 @@
local remap = vim.api.nvim_set_keymap
local npairs = require('nvim-autopairs')
npairs.setup({map_cr=false})
-- skip it, if you use another global object
_G.MUtils= {}
MUtils.completion_confirm=function()
if vim.fn["coc#pum#visible"]() ~= 0 then
return vim.fn["coc#pum#confirm"]()
else
return npairs.autopairs_cr()
end
end
remap('i' , '<CR>','v:lua.MUtils.completion_confirm()', {expr = true , noremap = true})
+38
View File
@@ -0,0 +1,38 @@
require("auto-session").setup ({
{
enabled = true,
root_dir = vim.fn.stdpath "data" .. "/sessions/",
auto_save = true,
auto_restore = true,
auto_create = true,
suppressed_dirs = nil,
allowed_dirs = nil,
auto_restore_last_session = false,
use_git_branch = false,
lazy_support = true,
bypass_save_filetypes = nil,
close_unsupported_windows = true,
args_allow_single_directory = true,
args_allow_files_auto_save = false,
continue_restore_on_error = true,
show_auto_restore_notif = false,
cwd_change_handling = false,
lsp_stop_on_restore = false,
log_level = "error",
session_lens = {
load_on_setup = true,
theme_conf = {
},
previewer = false,
mappings = {
delete_session = { "i", "<C-D>" },
alternate_session = { "i", "<C-S>" },
copy_session = { "i", "<C-Y>" },
},
session_control = {
control_dir = vim.fn.stdpath "data" .. "/auto_session/",
control_filename = "session_control.json",
},
},
}
})
+52
View File
@@ -0,0 +1,52 @@
require("barbar").setup ({
animation = true,
auto_hide = false,
tabpages = true,
clickable = true,
exclude_ft = { "NvimTree" },
focus_on_close = 'left',
highlight_alternate = false,
highlight_inactive_file_icons = true,
highlight_visible = true,
icons = {
buffer_index = false,
buffer_number = false,
button = '',
diagnostics = {
[vim.diagnostic.severity.ERROR] = {enabled = true, icon = ''},
[vim.diagnostic.severity.WARN] = {enabled = false},
[vim.diagnostic.severity.INFO] = {enabled = false},
[vim.diagnostic.severity.HINT] = {enabled = true},
},
gitsigns = {
added = {enabled = true, icon = '+'},
changed = {enabled = true, icon = '~'},
deleted = {enabled = true, icon = '-'},
},
filetype = {
custom_colors = false,
enabled = true,
},
separator = {left = '', right = ''},
separator_at_end = true,
modified = {button = ''},
pinned = {button = '', filename = true},
preset = 'default',
alternate = {filetype = {enabled = true}},
current = {buffer_index = false},
inactive = {button = '×', filetype = {enabled = true}, separator = {left = '', right = ''} },
visible = {modified = {buffer_number = false}},
},
insert_at_end = true,
maximum_padding = 1,
minimum_padding = 1,
maximum_length = 15,
minimum_length = 15,
sidebar_filetypes = {
NvimTree = true,
undotree = {
text = "undotree",
align = "center",
},
},
})
+1
View File
@@ -0,0 +1 @@
require("gruvbox-baby").setup()
+29
View File
@@ -0,0 +1,29 @@
local highlight = {
"RainbowRed",
"RainbowYellow",
"RainbowBlue",
"RainbowOrange",
"RainbowGreen",
"RainbowViolet",
"RainbowCyan",
}
local hooks = require "ibl.hooks"
-- create the highlight groups in the highlight setup hook, so they are reset
-- every time the colorscheme changes
hooks.register(hooks.type.HIGHLIGHT_SETUP, function()
vim.api.nvim_set_hl(0, "RainbowRed", { fg = "#E06C75" })
vim.api.nvim_set_hl(0, "RainbowYellow", { fg = "#E5C07B" })
vim.api.nvim_set_hl(0, "RainbowBlue", { fg = "#61AFEF" })
vim.api.nvim_set_hl(0, "RainbowOrange", { fg = "#D19A66" })
vim.api.nvim_set_hl(0, "RainbowGreen", { fg = "#98C379" })
vim.api.nvim_set_hl(0, "RainbowViolet", { fg = "#C678DD" })
vim.api.nvim_set_hl(0, "RainbowCyan", { fg = "#56B6C2" })
end)
vim.g.rainbow_delimiters = { highlight = highlight }
require("ibl").setup {
indent = { char = "" },
scope = { highlight = highlight }
}
hooks.register(hooks.type.SCOPE_HIGHLIGHT, hooks.builtin.scope_highlight_from_extmark)
+35
View File
@@ -0,0 +1,35 @@
-- Bootstrap lazy.nvim
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not (vim.uv or vim.loop).fs_stat(lazypath) then
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
if vim.v.shell_error ~= 0 then
vim.api.nvim_echo({
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
{ out, "WarningMsg" },
{ "\nPress any key to exit..." },
}, true, {})
vim.fn.getchar()
os.exit(1)
end
end
vim.opt.rtp:prepend(lazypath)
-- Make sure to setup `mapleader` and `maplocalleader` before
-- loading lazy.nvim so that mappings are correct.
-- This is also a good place to setup other settings (vim.opt)
vim.g.mapleader = " "
vim.g.maplocalleader = "\\"
-- Setup lazy.nvim
require("lazy").setup({
spec = {
-- import your plugins
{ import = "plugins" },
},
-- Configure any other settings here. See the documentation for more details.
-- colorscheme that will be used when installing plugins.
install = { colorscheme = { "habamax" } },
-- automatically check for plugin updates
checker = { enabled = true },
})
+236
View File
@@ -0,0 +1,236 @@
local fn = vim.fn
local function spell()
if vim.o.spell then
return string.format("[SPELL]")
end
return ""
end
--- show indicator for Chinese IME
local function ime_state()
if vim.g.is_mac then
-- ref: https://github.com/vim-airline/vim-airline/blob/master/autoload/airline/extensions/xkblayout.vim#L11
local layout = fn.libcall(vim.g.XkbSwitchLib, "Xkb_Switch_getXkbLayout", "")
-- We can use `xkbswitch -g` on the command line to get current mode.
-- mode for macOS builtin pinyin IME: com.apple.inputmethod.SCIM.ITABC
-- mode for Rime: im.rime.inputmethod.Squirrel.Rime
local res = fn.match(layout, [[\v(Squirrel\.Rime|SCIM.ITABC)]])
if res ~= -1 then
return "[CN]"
end
end
return ""
end
local function trailing_space()
if not vim.o.modifiable then
return ""
end
local line_num = nil
for i = 1, fn.line("$") do
local linetext = fn.getline(i)
-- To prevent invalid escape error, we wrap the regex string with `[[]]`.
local idx = fn.match(linetext, [[\v\s+$]])
if idx ~= -1 then
line_num = i
break
end
end
local msg = ""
if line_num ~= nil then
msg = string.format("[%d]trailing", line_num)
end
return msg
end
local function mixed_indent()
if not vim.o.modifiable then
return ""
end
local space_pat = [[\v^ +]]
local tab_pat = [[\v^\t+]]
local space_indent = fn.search(space_pat, "nwc")
local tab_indent = fn.search(tab_pat, "nwc")
local mixed = (space_indent > 0 and tab_indent > 0)
local mixed_same_line
if not mixed then
mixed_same_line = fn.search([[\v^(\t+ | +\t)]], "nwc")
mixed = mixed_same_line > 0
end
if not mixed then
return ""
end
if mixed_same_line ~= nil and mixed_same_line > 0 then
return "MI:" .. mixed_same_line
end
local space_indent_cnt = fn.searchcount({ pattern = space_pat, max_count = 1e3 }).total
local tab_indent_cnt = fn.searchcount({ pattern = tab_pat, max_count = 1e3 }).total
if space_indent_cnt > tab_indent_cnt then
return "MI:" .. tab_indent
else
return "MI:" .. space_indent
end
end
local diff = function()
local git_status = vim.b.gitsigns_status_dict
if git_status == nil then
return
end
local modify_num = git_status.changed
local remove_num = git_status.removed
local add_num = git_status.added
local info = { added = add_num, modified = modify_num, removed = remove_num }
-- vim.print(info)
return info
end
local virtual_env = function()
-- only show virtual env for Python
if vim.bo.filetype ~= "python" then
return ""
end
local conda_env = os.getenv("CONDA_DEFAULT_ENV")
local venv_path = os.getenv("VIRTUAL_ENV")
if venv_path == nil then
if conda_env == nil then
return ""
else
return string.format(" %s (conda)", conda_env)
end
else
local venv_name = vim.fn.fnamemodify(venv_path, ":t")
return string.format(" %s (venv)", venv_name)
end
end
local get_active_lsp = function()
local msg = "No Active Lsp"
local buf_ft = vim.api.nvim_get_option_value("filetype", {})
local clients = vim.lsp.get_clients { bufnr = 0 }
if next(clients) == nil then
return msg
end
for _, client in ipairs(clients) do
---@diagnostic disable-next-line: undefined-field
local filetypes = client.config.filetypes
if filetypes and vim.fn.index(filetypes, buf_ft) ~= -1 then
return client.name
end
end
return msg
end
require("lualine").setup {
options = {
icons_enabled = true,
theme = "auto",
component_separators = { left = "", right = "" },
section_separators = "",
disabled_filetypes = {},
always_divide_middle = true,
},
sections = {
lualine_a = {
"mode",
},
lualine_b = {
{
"branch",
fmt = function(name, _)
-- truncate branch name in case the name is too long
return string.sub(name, 1, 20)
end,
color = { gui = "italic,bold" },
},
{
virtual_env,
color = { fg = "black", bg = "#F1CA81" },
},
},
lualine_c = {
{
"filename",
symbols = {
readonly = "[🔒]",
},
},
{
"diff",
source = diff,
},
{
"%S",
color = { gui = "bold", fg = "cyan" },
},
{
spell,
color = { fg = "black", bg = "#a7c080" },
},
},
lualine_x = {
{
ime_state,
color = { fg = "black", bg = "#f46868" },
},
{
get_active_lsp,
icon = " LSP:",
},
{
"diagnostics",
sources = { "nvim_diagnostic" },
symbols = { error = "🆇 ", warn = "⚠️ ", info = " ", hint = "" },
},
},
lualine_y = {
{ "encoding", fmt = string.upper },
{
"fileformat",
symbols = {
unix = "unix",
dos = "win",
mac = "mac",
},
},
"filetype",
},
lualine_z = {
{
trailing_space,
color = "WarningMsg",
},
{
mixed_indent,
color = "WarningMsg",
},
"location",
"progress",
},
},
inactive_sections = {
lualine_a = {},
lualine_b = {},
lualine_c = { "filename" },
lualine_x = { "location" },
lualine_y = {},
lualine_z = {},
},
tabline = {},
extensions = { "quickfix", "fugitive", "nvim-tree" },
}
@@ -156,4 +156,3 @@ dap.listeners.before['event_progressEnd']['progress-notifications'] = function(s
})
notif_data.spinner = nil
end
+14
View File
@@ -0,0 +1,14 @@
require("nvim-tree").setup({
sort = {
sorter = "case_sensitive",
},
view = {
width = 30,
},
renderer = {
group_empty = true,
},
filters = {
dotfiles = true,
},
})
+1
View File
@@ -0,0 +1 @@
require("telescope").setup ({})
+25
View File
@@ -0,0 +1,25 @@
-- Default options:
require("gruvbox").setup({
terminal_colors = true, -- add neovim terminal colors
undercurl = true,
underline = true,
bold = true,
italic = {
strings = true,
emphasis = true,
comments = true,
operators = false,
folds = true,
},
strikethrough = true,
invert_selection = false,
invert_signs = false,
invert_tabline = false,
invert_intend_guides = false,
inverse = true, -- invert background for search, diffs, statuslines and errors
contrast = "", -- can be "hard", "soft" or empty string
palette_overrides = {},
overrides = {},
dim_inactive = false,
transparent_mode = false,
})
+40
View File
@@ -0,0 +1,40 @@
-- Lua
require('onedark').setup {
-- Main options --
style = 'light', -- Default theme style. Choose between 'dark', 'darker', 'cool', 'deep', 'warm', 'warmer' and 'light'
transparent = false, -- Show/hide background
term_colors = true, -- Change terminal color as per the selected theme style
ending_tildes = false, -- Show the end-of-buffer tildes. By default they are hidden
cmp_itemkind_reverse = false, -- reverse item kind highlights in cmp menu
-- toggle theme style ---
toggle_style_key = nil, -- keybind to toggle theme style. Leave it nil to disable it, or set it to a string, for example "<leader>ts"
toggle_style_list = {'dark', 'darker', 'cool', 'deep', 'warm', 'warmer', 'light'}, -- List of styles to toggle between
-- Change code style ---
-- Options are italic, bold, underline, none
-- You can configure multiple style with comma separated, For e.g., keywords = 'italic,bold'
code_style = {
comments = 'italic',
keywords = 'none',
functions = 'none',
strings = 'none',
variables = 'none'
},
-- Lualine options --
lualine = {
transparent = false, -- lualine center bar transparency
},
-- Custom Highlights --
colors = {}, -- Override default colors
highlights = {}, -- Override highlight groups
-- Plugins Config --
diagnostics = {
darker = true, -- darker colors for diagnostic
undercurl = true, -- use undercurl instead of underline for diagnostics
background = true, -- use background color for virtual text
},
}
+16
View File
@@ -0,0 +1,16 @@
require'nvim-treesitter.configs'.setup {
ensure_installed = "all",
sync_install = false,
auto_install = true,
highlight = {
enable = true,
disable = function(lang, buf)
local max_filesize = 100 * 1024
local ok, stats = pcall(vim.loop.fs_stat, vim.api.nvim_buf_get_name(buf))
if ok and stats and stats.size > max_filesize then
return true
end
end,
additional_vim_regex_highlighting = false,
},
}
+19
View File
@@ -0,0 +1,19 @@
require('undotree').setup({
float_diff = true,
layout = "left_bottom",
position = "left",
ignore_filetype = { 'undotree', 'undotreeDiff', 'qf', 'TelescopePrompt', 'spectre_panel', 'tsplayground' },
window = {
winblend = 30,
},
keymaps = {
['j'] = "move_next",
['k'] = "move_prev",
['gj'] = "move2parent",
['J'] = "move_change_next",
['K'] = "move_change_prev",
['<cr>'] = "action_enter",
['p'] = "enter_diffbuf",
['q'] = "quit",
},
})
-45
View File
@@ -1,45 +0,0 @@
require("auto-session").setup {
enabled = true,
-- log_level = 'debug',
root_dir = vim.fn.stdpath "data" .. "/sessions/",
auto_save = true,
auto_restore = true,
auto_create = true,
suppressed_dirs = "/home/zach",
allowed_dirs = nil,
auto_restore_last_session = false,
use_git_branch = false,
lazy_support = true,
bypass_save_filetypes = nil,
close_unsupported_windows = true,
args_allow_single_directory = true,
args_allow_files_auto_save = true,
continue_restore_on_error = true,
show_auto_restore_notif = true,
cwd_change_handling = false,
lsp_stop_on_restore = false,
session_lens = {
load_on_setup = true,
theme_conf = {
-- test
},
previewer = false,
mappings = {
delete_session = { "i", "<C-D>" },
alternate_session = { "i", "<C-S>" },
copy_session = { "i", "<C-Y>" },
},
session_control = {
control_dir = vim.fn.stdpath "data" .. "/auto_session/",
control_filename = "session_control.json",
},
},
vim.api.nvim_create_autocmd({ "VimLeavePre" }, {
callback = function()
vim.cmd( "SessionSave" )
end,
}),
}
-22
View File
@@ -1,22 +0,0 @@
local opts = { noremap=true, silent=true }
require("bufresize").setup({
register = {
keys = {
{ "n", "<C-w><", "<C-w><", opts },
{ "n", "<C-w>>", "<C-w>>", opts },
{ "n", "<C-w>+", "<C-w>+", opts },
{ "n", "<C-w>-", "<C-w>-", opts },
{ "n", "<C-w>_", "<C-w>_", opts },
{ "n", "<C-w>=", "<C-w>=", opts },
{ "n", "<C-w>|", "<C-w>|", opts },
{ "", "<LeftRelease>", "<LeftRelease>", opts },
{ "i", "<LeftRelease>", "<LeftRelease><C-o>", opts },
},
trigger_events = { "BufWinEnter", "WinEnter" },
},
resize = {
keys = {},
trigger_events = { "VimResized" },
increment = false,
},
})
-64
View File
@@ -1,64 +0,0 @@
dofile(vim.g.base46_cache .. "cmp")
local cmp = require "cmp"
cmp.setup {
completion = { completeopt = "menu,menuone" },
snippet = {
expand = function(args)
require("luasnip").lsp_expand(args.body)
end,
},
mapping = {
["<C-p>"] = cmp.mapping.select_prev_item(),
["<C-n>"] = cmp.mapping.select_next_item(),
["<C-d>"] = cmp.mapping.scroll_docs(-4),
["<C-f>"] = cmp.mapping.scroll_docs(4),
["<C-Space>"] = cmp.mapping.complete(),
["<C-e>"] = cmp.mapping.close(),
["<CR>"] = cmp.mapping.confirm {
behavior = cmp.ConfirmBehavior.Insert,
select = true,
},
["<Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_next_item()
elseif require("luasnip").expand_or_jumpable() then
require("luasnip").expand_or_jump()
else
fallback()
end
end, { "i", "s" }),
["<S-Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_prev_item()
elseif require("luasnip").jumpable(-1) then
require("luasnip").jump(-1)
else
fallback()
end
end, { "i", "s" }),
},
sources = {
{ name = "nvim_lsp" },
{ name = "luasnip" },
{ name = "buffer" },
{ name = "nvim_lua" },
{ name = "async_path" },
},
}
cmp.setup.cmdline(':', {
mapping = cmp.mapping.preset.cmdline(),
sources = cmp.config.sources({
{ name = 'path' },
{ name = 'cmdline' },
}),
matching = { disallow_symbol_nonprefix_matching = false },
})
-15
View File
@@ -1,15 +0,0 @@
local options = {
formatters_by_ft = {
lua = { "stylua" },
-- css = { "prettier" },
-- html = { "prettier" },
},
-- format_on_save = {
-- -- These options will be passed to conform.format()
-- timeout_ms = 500,
-- lsp_fallback = true,
-- },
}
return options
-62
View File
@@ -1,62 +0,0 @@
require("focus").setup({
enable = true,
commands = true,
autoresize = {
enable = true,
width = 0,
height = 0,
minwidth = 0,
minheight = 0,
height_quickfix = 10,
},
split = {
bufnew = false,
tmux = false,
},
ui = {
number = false,
relativenumber = false,
hybridnumber = false,
absolutenumber_unfocussed = false,
cursorline = true,
cursorcolumn = false,
colorcolumn = {
enable = false,
list = '+1',
},
signcolumn = false,
winhighlight = false,
}
})
local ignore_filetypes = {"NvimTree"}
local ignore_buftypes = {"prompt", "popup"}
local augroup =
vim.api.nvim_create_augroup("FocusDisable", { clear = true })
vim.api.nvim_create_autocmd("WinEnter", {
group = augroup,
callback = function(_)
if vim.tbl_contains(ignore_buftypes, vim.bo.buftype)
then
vim.w.focus_disable = true
else
vim.w.focus_disable = false
end
end,
desc = "Disable focus autoresize for BufType",
})
vim.api.nvim_create_autocmd("FileType", {
group = augroup,
callback = function(_)
if vim.tbl_contains(ignore_filetypes, vim.bo.filetype) then
vim.b.focus_disable = true
else
vim.b.focus_disable = false
end
end,
desc = "Disable focus autoresize for FileType",
})
-10
View File
@@ -1,10 +0,0 @@
local config = {
cmd = { "/usr/bin/jdtls" },
root_dir = vim.fs.dirname( vim.fs.find( {
"gradlew",
".git",
"mvnw",
},
{ upward = true })[1]),
}
require("jdtls").start_or_attach(config)
-47
View File
@@ -1,47 +0,0 @@
return {
defaults = { lazy = false },
install = { colorscheme = { "nvchad" } },
ui = {
icons = {
ft = "",
lazy = "󰂠 ",
loaded = "",
not_loaded = "",
},
},
performance = {
rtp = {
disabled_plugins = {
"2html_plugin",
"tohtml",
"getscript",
"getscriptPlugin",
"gzip",
"logipat",
"netrw",
"netrwPlugin",
"netrwSettings",
"netrwFileHandlers",
"matchit",
"tar",
"tarPlugin",
"rrhelper",
"spellfile_plugin",
"vimball",
"vimballPlugin",
"zip",
"zipPlugin",
"tutor",
"rplugin",
"syntax",
"synmenu",
"optwin",
"compiler",
"bugreport",
"ftplugin",
},
},
},
}
-114
View File
@@ -1,114 +0,0 @@
local cmp = require("cmp")
local cmp_lsp = require("cmp_nvim_lsp")
local capabilities = vim.tbl_deep_extend(
"force",
{},
vim.lsp.protocol.make_client_capabilities(),
cmp_lsp.default_capabilities()
)
require("nvchad.configs.lspconfig").defaults()
require("fidget").setup({})
require("mason").setup()
require("mason-lspconfig").setup({
ensure_installed = {
"lua_ls",
"rust_analyzer",
"gopls",
},
handlers = {
function(server_name) -- default handler (optional)
require("lspconfig")[server_name].setup {
capabilities = capabilities
}
end,
zls = function()
local lspconfig = require("lspconfig")
lspconfig.zls.setup({
root_dir = lspconfig.util.root_pattern(".git", "build.zig", "zls.json"),
settings = {
zls = {
enable_inlay_hints = true,
enable_snippets = true,
warn_style = true,
},
},
})
vim.g.zig_fmt_parse_errors = 0
vim.g.zig_fmt_autosave = 0
end,
["lua_ls"] = function()
local lspconfig = require("lspconfig")
lspconfig.lua_ls.setup {
capabilities = capabilities,
settings = {
Lua = {
runtime = { version = "Lua 5.1" },
diagnostics = {
globals = { "bit", "vim", "it", "describe", "before_each", "after_each" },
}
}
}
}
end,
}
})
local cmp_select = { behaivior = cmp.SelectBehavior.Select }
cmp.setup({
snippet = {
expand = function(args)
require('luasnip').lsp_expand(args.body) -- For `luasnip` users.
end,
},
sources = cmp.config.sources({
{ name = 'nvim_lsp' },
{ name = 'luasnip' }, -- For luasnip users.
},
{
{ name = 'buffer' },
})
})
vim.diagnostic.config({
-- update_in_insert = true,
float = {
focusable = false,
style = "minimal",
border = "rounded",
source = "always",
header = "",
prefix = "",
},
})
local lspconfig = require "lspconfig"
-- EXAMPLE
local servers = {
"html",
"cssls",
"bashls",
"texlab",
"pyright",
"ts_ls",
"jdtls",
"sourcekit",
"zls",
}
for _, server in ipairs(servers) do
lspconfig[server].setup {
}
end
-- lspconfig.hyprls.setup {
-- root_dir = vim.fs.root( 0, 'hyprland.conf' ),
-- single_file_support = false,
-- filetypes = { "conf" },
-- }
-285
View File
@@ -1,285 +0,0 @@
require("neogit").setup {
disable_hint = false,
disable_context_highlighting = false,
disable_signs = false,
disable_insert_on_commit = "auto",
filewatcher = {
interval = 1000,
enabled = true,
},
graph_style = "ascii",
commit_date_format = nil,
log_date_format = nil,
process_spinner = false,
git_services = {
["github.com"] = "https://github.com/${owner}/${repository}/compare/${branch_name}?expand=1",
["bitbucket.org"] = "https://bitbucket.org/${owner}/${repository}/pull-requests/new?source=${branch_name}&t=1",
["gitlab.com"] = "https://gitlab.com/${owner}/${repository}/merge_requests/new?merge_request[source_branch]=${branch_name}",
["azure.com"] = "https://dev.azure.com/${owner}/_git/${repository}/pullrequestcreate?sourceRef=${branch_name}&targetRef=${target}",
},
telescope_sorter = function()
return require("telescope").extensions.fzf.native_fzf_sorter()
end,
remember_settings = true,
use_per_project_settings = true,
ignored_settings = {
"NeogitPushPopup--force-with-lease",
"NeogitPushPopup--force",
"NeogitPullPopup--rebase",
"NeogitCommitPopup--allow-empty",
"NeogitRevertPopup--no-edit",
},
highlight = {
italic = true,
bold = true,
underline = true
},
use_default_keymaps = true,
auto_refresh = true,
sort_branches = "-committerdate",
initial_branch_name = "",
kind = "tab",
disable_line_numbers = true,
disable_relative_line_numbers = true,
console_timeout = 2000,
auto_show_console = true,
auto_close_console = true,
notification_icon = "󰊢",
status = {
show_head_commit_hash = true,
recent_commit_count = 10,
HEAD_padding = 10,
HEAD_folded = false,
mode_padding = 3,
mode_text = {
M = "modified",
N = "new file",
A = "added",
D = "deleted",
C = "copied",
U = "updated",
R = "renamed",
DD = "unmerged",
AU = "unmerged",
UD = "unmerged",
UA = "unmerged",
DU = "unmerged",
AA = "unmerged",
UU = "unmerged",
["?"] = "",
},
},
commit_editor = {
kind = "tab",
show_staged_diff = true,
staged_diff_split_kind = "split",
spell_check = true,
},
commit_select_view = {
kind = "tab",
},
commit_view = {
kind = "vsplit",
verify_commit = vim.fn.executable("gpg") == 1,
},
log_view = {
kind = "tab",
},
rebase_editor = {
kind = "auto",
},
reflog_view = {
kind = "tab",
},
merge_editor = {
kind = "auto",
},
description_editor = {
kind = "auto",
},
tag_editor = {
kind = "auto",
},
preview_buffer = {
kind = "floating_console",
},
popup = {
kind = "split",
},
stash = {
kind = "tab",
},
refs_view = {
kind = "tab",
},
signs = {
hunk = { "", "" },
item = { ">", "v" },
section = { ">", "v" },
},
integrations = {
telescope = nil,
diffview = nil,
fzf_lua = nil,
mini_pick = nil,
},
sections = {
sequencer = {
folded = false,
hidden = false,
},
untracked = {
folded = false,
hidden = false,
},
unstaged = {
folded = false,
hidden = false,
},
staged = {
folded = false,
hidden = false,
},
stashes = {
folded = true,
hidden = false,
},
unpulled_upstream = {
folded = true,
hidden = false,
},
unmerged_upstream = {
folded = false,
hidden = false,
},
unpulled_pushRemote = {
folded = true,
hidden = false,
},
unmerged_pushRemote = {
folded = false,
hidden = false,
},
recent = {
folded = true,
hidden = false,
},
rebase = {
folded = true,
hidden = false,
},
},
mappings = {
commit_editor = {
["q"] = "Close",
["<c-c><c-c>"] = "Submit",
["<c-c><c-k>"] = "Abort",
["<m-p>"] = "PrevMessage",
["<m-n>"] = "NextMessage",
["<m-r>"] = "ResetMessage",
},
commit_editor_I = {
["<c-c><c-c>"] = "Submit",
["<c-c><c-k>"] = "Abort",
},
rebase_editor = {
["p"] = "Pick",
["r"] = "Reword",
["e"] = "Edit",
["s"] = "Squash",
["f"] = "Fixup",
["x"] = "Execute",
["d"] = "Drop",
["b"] = "Break",
["q"] = "Close",
["<cr>"] = "OpenCommit",
["gk"] = "MoveUp",
["gj"] = "MoveDown",
["<c-c><c-c>"] = "Submit",
["<c-c><c-k>"] = "Abort",
["[c"] = "OpenOrScrollUp",
["]c"] = "OpenOrScrollDown",
},
rebase_editor_I = {
["<c-c><c-c>"] = "Submit",
["<c-c><c-k>"] = "Abort",
},
finder = {
["<cr>"] = "Select",
["<c-c>"] = "Close",
["<esc>"] = "Close",
["<c-n>"] = "Next",
["<c-p>"] = "Previous",
["<down>"] = "Next",
["<up>"] = "Previous",
["<tab>"] = "InsertCompletion",
["<space>"] = "MultiselectToggleNext",
["<s-space>"] = "MultiselectTogglePrevious",
["<c-j>"] = "NOP",
["<ScrollWheelDown>"] = "ScrollWheelDown",
["<ScrollWheelUp>"] = "ScrollWheelUp",
["<ScrollWheelLeft>"] = "NOP",
["<ScrollWheelRight>"] = "NOP",
["<LeftMouse>"] = "MouseClick",
["<2-LeftMouse>"] = "NOP",
},
popup = {
["?"] = "HelpPopup",
["A"] = "CherryPickPopup",
["d"] = "DiffPopup",
["M"] = "RemotePopup",
["P"] = "PushPopup",
["X"] = "ResetPopup",
["Z"] = "StashPopup",
["i"] = "IgnorePopup",
["t"] = "TagPopup",
["b"] = "BranchPopup",
["B"] = "BisectPopup",
["w"] = "WorktreePopup",
["c"] = "CommitPopup",
["f"] = "FetchPopup",
["l"] = "LogPopup",
["m"] = "MergePopup",
["p"] = "PullPopup",
["r"] = "RebasePopup",
["v"] = "RevertPopup",
},
status = {
["j"] = "MoveDown",
["k"] = "MoveUp",
["o"] = "OpenTree",
["q"] = "Close",
["I"] = "InitRepo",
["1"] = "Depth1",
["2"] = "Depth2",
["3"] = "Depth3",
["4"] = "Depth4",
["Q"] = "Command",
["<tab>"] = "Toggle",
["x"] = "Discard",
["s"] = "Stage",
["S"] = "StageUnstaged",
["<c-s>"] = "StageAll",
["u"] = "Unstage",
["K"] = "Untrack",
["U"] = "UnstageStaged",
["y"] = "ShowRefs",
["$"] = "CommandHistory",
["Y"] = "YankSelected",
["<c-r>"] = "RefreshBuffer",
["<cr>"] = "GoToFile",
["<s-cr>"] = "PeekFile",
["<c-v>"] = "VSplitOpen",
["<c-x>"] = "SplitOpen",
["<c-t>"] = "TabOpen",
["{"] = "GoToPreviousHunkHeader",
["}"] = "GoToNextHunkHeader",
["[c"] = "OpenOrScrollUp",
["]c"] = "OpenOrScrollDown",
["<c-k>"] = "PeekUp",
["<c-j>"] = "PeekDown",
["<c-n>"] = "NextSection",
["<c-p>"] = "PreviousSection",
},
},
}
-23
View File
@@ -1,23 +0,0 @@
require("neorg").setup({
load = {
["core.defaults"] = {}, -- Load all the default modules
["core.concealer"] = {}, -- Allows for use of icons
["core.highlights"] = {},
["core.autocommands"] = {},
["core.integrations.treesitter"] = {},
["core.neorgcmd"] = {},
["core.dirman"] = { -- Manages Neorg workspaces
config = {
workspaces = {
my_workspace = "~/neorg"
}
}
},
["core.export"] = {}, -- Export functionality
["core.latex.renderer"] = {
config = {
render_on_enter = true,
}
}
}
})
-48
View File
@@ -1,48 +0,0 @@
vim.opt.relativenumber = true
vim.opt.tabstop = 4
vim.opt.softtabstop = 4
vim.opt.shiftwidth = 4
vim.opt.expandtab = true
vim.opt.smartindent = true
vim.opt.wrap = true
vim.opt.linebreak = true
vim.opt.swapfile = false
vim.opt.backup = false
vim.opt.undodir = os.getenv("HOME") .. "/.nvim/undodir"
vim.opt.undofile = true
vim.opt.hlsearch = false
vim.opt.incsearch = true
vim.opt.termguicolors = true
vim.opt.scrolloff = 8
vim.opt.signcolumn = "yes:1"
vim.opt.isfname:append("@-@")
vim.opt.updatetime = 50
vim.opt.colorcolumn = "80"
vim.opt.textwidth = 80
vim.opt.formatoptions = "tcrqnj"
vim.o.sessionoptions = "blank,buffers,curdir,folds,help,tabpages,winsize,winpos,terminal,localoptions"
vim.o.laststatus = 3
vim.o.clipboard = "unnamedplus"
vim.o.cursorline = true
vim.o.cursorlineopt = "number"
vim.opt.fillchars = { eob = " " }
vim.o.ignorecase = true
vim.o.smartcase = true
vim.o.mouse = "a"
vim.o.number = true
vim.o.numberwidth = 3
vim.o.ruler = false
vim.o.showmode = false
vim.opt.shortmess:append "sI"
vim.o.splitbelow = true
vim.o.splitright = true
vim.o.timeoutlen = 400
vim.opt.whichwrap:append "<>[]hl"
vim.g.loaded_node_provider = 0
vim.g.loaded_python3_provider = 0
vim.g.loaded_perl_provider = 0
vim.g.loaded_ruby_provider = 0
local is_windows = vim.fn.has "win32" ~= 0
local sep = is_windows and "\\" or "/"
local delim = is_windows and ";" or ":"
vim.env.PATH = table.concat({ vim.fn.stdpath "data", "mason", "bin" }, sep) .. delim .. vim.env.PATH
-16
View File
@@ -1,16 +0,0 @@
pcall(function()
dofile(vim.g.base46_cache .. "syntax")
dofile(vim.g.base46_cache .. "treesitter")
end)
require('nvim-treesitter.configs').setup {
build = ":TSUpdate",
ensure_installed = "all",
sync_install = false,
auto_install = true,
highlight = {
enable = true,
additional_vim_regex_highlighting = false,
},
}
+17
View File
@@ -0,0 +1,17 @@
local time = tonumber( os.date "%H" )
vim.g.loaded_netrw = 1
vim.g.loaded_netrwPlugin = 1
vim.g.base46_cache = vim.fn.stdpath "data" .. "/base46/"
vim.g.mapleader = " "
vim.g.gruvbox_material_background = "medium"
vim.g.coq_settings = { keymap = { recommended = false } }
vim.g.gruvbox_material_foreground = "original"
if time >= 10 and time < 20 then
vim.g.lightline = {
colorscheme = "one",
}
else
vim.g.lightline = {
colorscheme = "gruvbox",
}
end
-17
View File
@@ -1,17 +0,0 @@
local autocmd = vim.api.nvim_create_autocmd
autocmd('LspAttach', {
callback = function(e)
local opts = { buffer = e.buf }
vim.keymap.set("n", "gd", function() vim.lsp.buf.definition() end, opts)
vim.keymap.set("n", "K", function() vim.lsp.buf.hover() end, opts)
vim.keymap.set("n", "<leader>vws", function() vim.lsp.buf.workspace_symbol() end, opts)
vim.keymap.set("n", "<leader>vd", function() vim.diagnostic.open_float() end, opts)
vim.keymap.set("n", "<leader>vca", function() vim.lsp.buf.code_action() end, opts)
vim.keymap.set("n", "<leader>vrr", function() vim.lsp.buf.references() end, opts)
vim.keymap.set("n", "<leader>vrn", function() vim.lsp.buf.rename() end, opts)
vim.keymap.set("i", "<C-h>", function() vim.lsp.buf.signature_help() end, opts)
vim.keymap.set("n", "[d", function() vim.diagnostic.goto_next() end, opts)
vim.keymap.set("n", "]d", function() vim.diagnostic.goto_prev() end, opts)
end
})
+37 -4
View File
@@ -1,7 +1,8 @@
require "nvchad.mappings"
local map = vim.keymap.set
map("n", "<Tab>", ":BufferNext<CR>")
map("n", "<S-Tab>", ":BufferPrevious<CR>")
map("n", ";", ":", { desc = "CMD enter command mode" })
-- Move selected text up
@@ -19,8 +20,40 @@ map("n", "<A-c>", vim.cmd.CopilotChatToggle)
map("i", "<A-c>", vim.cmd.CopilotChatToggle)
map("v", "<A-c>", vim.cmd.CopilotChatToggle)
map('n', '<leader>u', vim.cmd.UndotreeToggle)
map('n', '<leader>e', vim.cmd.NvimTreeToggle)
map('n', '<leader>u', require('undotree').toggle, { noremap = true, silent = true })
map("n", "<A-->", "<cmd>BufDel<cr>")
map("n", "<A-->", ":BufferClose<CR>")
map("n", "<SA-->", ":BufferRestore<CR>")
map("n", "<C-a>", "ggVG", { noremap = true, silent = true })
map("n", "<leader>pv", vim.cmd.Ex)
map("v", "J", ":m '>+1<CR>gv=gv")
map("v", "K", ":m '<-2<CR>gv=gv")
map("n", "J", "mzJ`z")
map("n", "<C-d>", "<C-d>zz")
map("n", "<C-u>", "<C-u>zz")
map("n", "n", "nzzzv")
map("n", "N", "Nzzzv")
map("n", "<leader>zig", "<cmd>LspRestart<cr>")
-- greatest remap ever
map("x", "<leader>p", [["_dP]])
-- next greatest remap ever : asbjornHaland
map({"n", "v"}, "<leader>y", [["+y]])
map("n", "<leader>Y", [["+Y]])
map({"n", "v"}, "<leader>d", "\"_d")
-- This is going to get me cancelled
map("i", "<C-c>", "<Esc>")
map("n", "<leader>mr", "<cmd>CellularAutomaton make_it_rain<CR>");
map("n", "<leader><leader>", function()
vim.cmd("so")
end)
-27
View File
@@ -1,27 +0,0 @@
local autocmd = vim.api.nvim_create_autocmd
-- user event that loads after UIEnter + only if file buf is there
-- autocmd({ "UIEnter", "BufReadPost", "BufNewFile" }, {
-- group = vim.api.nvim_create_augroup("NvFilePost", { clear = true }),
-- callback = function(args)
-- local file = vim.api.nvim_buf_get_name(args.buf)
-- local buftype = vim.api.nvim_get_option_value("buftype", { buf = args.buf })
--
-- if not vim.g.ui_entered and args.event == "UIEnter" then
-- vim.g.ui_entered = true
-- end
--
-- if file ~= "" and buftype ~= "nofile" and vim.g.ui_entered then
-- vim.api.nvim_exec_autocmds("User", { pattern = "FilePost", modeline = false })
-- vim.api.nvim_del_augroup_by_name "NvFilePost"
--
-- vim.schedule(function()
-- vim.api.nvim_exec_autocmds("FileType", {})
--
-- if vim.g.editorconfig then
-- require("editorconfig").config(args.buf)
-- end
-- end)
-- end
-- end,
-- })
-9
View File
@@ -1,9 +0,0 @@
dofile(vim.g.base46_cache .. "git")
return {
signs = {
delete = { text = "󰍵" },
changedelete = { text = "󱕖" },
},
attach_to_untracked = true,
}
-84
View File
@@ -1,84 +0,0 @@
local M = {}
local map = vim.keymap.set
-- export on_attach & capabilities
M.on_attach = function(_, bufnr)
local function opts(desc)
return { buffer = bufnr, desc = "LSP " .. desc }
end
map("n", "gD", vim.lsp.buf.declaration, opts "Go to declaration")
map("n", "gd", vim.lsp.buf.definition, opts "Go to definition")
map("n", "gi", vim.lsp.buf.implementation, opts "Go to implementation")
map("n", "<leader>sh", vim.lsp.buf.signature_help, opts "Show signature help")
map("n", "<leader>wa", vim.lsp.buf.add_workspace_folder, opts "Add workspace folder")
map("n", "<leader>wr", vim.lsp.buf.remove_workspace_folder, opts "Remove workspace folder")
map("n", "<leader>wl", function()
print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
end, opts "List workspace folders")
map("n", "<leader>D", vim.lsp.buf.type_definition, opts "Go to type definition")
map({ "n", "v" }, "<leader>ca", vim.lsp.buf.code_action, opts "Code action")
map("n", "gr", vim.lsp.buf.references, opts "Show references")
end
-- disable semanticTokens
M.on_init = function(client, _)
if client.supports_method "textDocument/semanticTokens" then
client.server_capabilities.semanticTokensProvider = nil
end
end
M.capabilities = vim.lsp.protocol.make_client_capabilities()
M.capabilities.textDocument.completion.completionItem = {
documentationFormat = { "markdown", "plaintext" },
snippetSupport = true,
preselectSupport = true,
insertReplaceSupport = true,
labelDetailsSupport = true,
deprecatedSupport = true,
commitCharactersSupport = true,
tagSupport = { valueSet = { 1 } },
resolveSupport = {
properties = {
"documentation",
"detail",
"additionalTextEdits",
},
},
}
M.defaults = function()
dofile(vim.g.base46_cache .. "lsp")
require("nvchad.lsp").diagnostic_config()
require("lspconfig").lua_ls.setup {
on_attach = M.on_attach,
capabilities = M.capabilities,
on_init = M.on_init,
settings = {
Lua = {
diagnostics = {
globals = { "vim" },
},
workspace = {
-- library = {
-- vim.fn.expand "$VIMRUNTIME/lua",
-- 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,
},
},
},
}
end
return M
-22
View File
@@ -1,22 +0,0 @@
-- vscode format
require("luasnip.loaders.from_vscode").lazy_load { exclude = vim.g.vscode_snippets_exclude or {} }
require("luasnip.loaders.from_vscode").lazy_load { paths = vim.g.vscode_snippets_path or "" }
-- snipmate format
require("luasnip.loaders.from_snipmate").load()
require("luasnip.loaders.from_snipmate").lazy_load { paths = vim.g.snipmate_snippets_path or "" }
-- lua format
require("luasnip.loaders.from_lua").load()
require("luasnip.loaders.from_lua").lazy_load { paths = vim.g.lua_snippets_path or "" }
vim.api.nvim_create_autocmd("InsertLeave", {
callback = function()
if
require("luasnip").session.current_nodes[vim.api.nvim_get_current_buf()]
and not require("luasnip").session.jump_active
then
require("luasnip").unlink_current()
end
end,
})
-15
View File
@@ -1,15 +0,0 @@
dofile(vim.g.base46_cache .. "mason")
return {
PATH = "skip",
ui = {
icons = {
package_pending = "",
package_installed = "",
package_uninstalled = "",
},
},
max_concurrent_installers = 10,
}
-34
View File
@@ -1,34 +0,0 @@
dofile(vim.g.base46_cache .. "nvimtree")
return {
filters = { dotfiles = false },
disable_netrw = true,
hijack_cursor = true,
sync_root_with_cwd = true,
update_focused_file = {
enable = true,
update_root = false,
},
view = {
width = 30,
preserve_window_proportions = true,
},
renderer = {
root_folder_label = false,
highlight_git = true,
indent_markers = { enable = true },
icons = {
glyphs = {
default = "󰈚",
folder = {
default = "",
empty = "",
empty_open = "",
open = "",
symlink = "",
},
git = { unmerged = "" },
},
},
},
}
-24
View File
@@ -1,24 +0,0 @@
dofile(vim.g.base46_cache .. "telescope")
return {
defaults = {
prompt_prefix = "",
selection_caret = " ",
entry_prefix = " ",
sorting_strategy = "ascending",
layout_config = {
horizontal = {
prompt_position = "top",
preview_width = 0.55,
},
width = 0.87,
height = 0.80,
},
mappings = {
n = { ["q"] = require("telescope.actions").close },
},
},
extensions_list = { "themes", "terms" },
extensions = {},
}
-15
View File
@@ -1,15 +0,0 @@
pcall(function()
dofile(vim.g.base46_cache .. "syntax")
dofile(vim.g.base46_cache .. "treesitter")
end)
return {
ensure_installed = { "lua", "luadoc", "printf", "vim", "vimdoc" },
highlight = {
enable = true,
use_languagetree = true,
},
indent = { enable = true },
}
-107
View File
@@ -1,107 +0,0 @@
local map = vim.keymap.set
map("i", "<C-b>", "<ESC>^i", { desc = "move beginning of line" })
map("i", "<C-e>", "<End>", { desc = "move end of line" })
map("i", "<C-h>", "<Left>", { desc = "move left" })
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", "<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 = "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>fm", function()
require("conform").format { lsp_fallback = true }
end, { desc = "general format file" })
-- global lsp mappings
map("n", "<leader>ds", vim.diagnostic.setloclist, { desc = "LSP diagnostic loclist" })
-- tabufline
map("n", "<leader>b", "<cmd>enew<CR>", { desc = "buffer new" })
map("n", "<tab>", function()
require("nvchad.tabufline").next()
end, { desc = "buffer goto next" })
map("n", "<S-tab>", function()
require("nvchad.tabufline").prev()
end, { desc = "buffer goto prev" })
map("n", "<leader>x", function()
require("nvchad.tabufline").close_buffer()
end, { desc = "buffer close" })
-- Comment
map("n", "<leader>/", "gcc", { desc = "toggle comment", remap = true })
map("v", "<leader>/", "gc", { desc = "toggle comment", remap = true })
-- nvimtree
map("n", "<C-n>", "<cmd>NvimTreeToggle<CR>", { desc = "nvimtree toggle window" })
map("n", "<leader>e", "<cmd>NvimTreeFocus<CR>", { desc = "nvimtree focus window" })
-- telescope
map("n", "<leader>fw", "<cmd>Telescope live_grep<CR>", { desc = "telescope live grep" })
map("n", "<leader>fb", "<cmd>Telescope buffers<CR>", { desc = "telescope find buffers" })
map("n", "<leader>fh", "<cmd>Telescope help_tags<CR>", { desc = "telescope help page" })
map("n", "<leader>ma", "<cmd>Telescope marks<CR>", { desc = "telescope find marks" })
map("n", "<leader>fo", "<cmd>Telescope oldfiles<CR>", { desc = "telescope find oldfiles" })
map("n", "<leader>fz", "<cmd>Telescope current_buffer_fuzzy_find<CR>", { desc = "telescope find in current buffer" })
map("n", "<leader>cm", "<cmd>Telescope git_commits<CR>", { desc = "telescope git commits" })
map("n", "<leader>gt", "<cmd>Telescope git_status<CR>", { desc = "telescope git status" })
map("n", "<leader>pt", "<cmd>Telescope terms<CR>", { desc = "telescope pick hidden term" })
map("n", "<leader>th", function()
require("nvchad.themes").open()
end, { desc = "telescope nvchad themes" })
map("n", "<leader>ff", "<cmd>Telescope find_files<cr>", { desc = "telescope find files" })
map(
"n",
"<leader>fa",
"<cmd>Telescope find_files follow=true no_ignore=true hidden=true<CR>",
{ desc = "telescope find all files" }
)
-- terminal
map("t", "<C-x>", "<C-\\><C-N>", { desc = "terminal escape terminal mode" })
-- new terminals
map("n", "<leader>h", function()
require("nvchad.term").new { pos = "sp" }
end, { desc = "terminal new horizontal term" })
map("n", "<leader>v", function()
require("nvchad.term").new { pos = "vsp" }
end, { desc = "terminal new vertical term" })
-- toggleable
map({ "n", "t" }, "<A-v>", function()
require("nvchad.term").toggle { pos = "vsp", id = "vtoggleTerm" }
end, { desc = "terminal toggleable vertical term" })
map({ "n", "t" }, "<A-h>", function()
require("nvchad.term").toggle { pos = "sp", id = "htoggleTerm" }
end, { desc = "terminal toggleable horizontal term" })
map({ "n", "t" }, "<A-i>", function()
require("nvchad.term").toggle { pos = "float", id = "floatTerm" }
end, { desc = "terminal toggle floating term" })
-- whichkey
map("n", "<leader>wK", "<cmd>WhichKey <CR>", { desc = "whichkey all keymaps" })
map("n", "<leader>wk", function()
vim.cmd("WhichKey " .. vim.fn.input "WhichKey: ")
end, { desc = "whichkey query lookup" })
-2
View File
@@ -1,2 +0,0 @@
-------------------------------------- options
---------------------------------------------
+48 -5
View File
@@ -1,5 +1,48 @@
require "nvchad.options"
-- add yours here!
-- local o = vim.o o.cursorlineopt ='both' -- to enable cursorline!
vim.opt.relativenumber = true
vim.opt.tabstop = 4
vim.opt.softtabstop = 4
vim.opt.shiftwidth = 4
vim.opt.expandtab = true
vim.opt.smartindent = true
vim.opt.wrap = true
vim.opt.linebreak = true
vim.opt.swapfile = false
vim.opt.backup = false
vim.opt.undodir = os.getenv("HOME") .. "/.nvim/undodir"
vim.opt.undofile = true
vim.opt.hlsearch = false
vim.opt.incsearch = true
vim.opt.termguicolors = true
vim.opt.scrolloff = 8
vim.opt.signcolumn = "yes:1"
vim.opt.isfname:append("@-@")
vim.opt.updatetime = 50
vim.opt.colorcolumn = "80"
vim.opt.textwidth = 80
vim.opt.formatoptions = "tcrqnj"
vim.o.sessionoptions = "blank,buffers,curdir,folds,help,tabpages,winsize,winpos,terminal,localoptions"
vim.o.laststatus = 3
vim.o.clipboard = "unnamedplus"
vim.o.cursorline = true
vim.o.cursorlineopt = "number"
vim.opt.fillchars = { eob = " " }
vim.o.ignorecase = true
vim.o.smartcase = true
vim.o.mouse = "a"
vim.o.number = true
vim.o.numberwidth = 3
vim.o.ruler = false
vim.o.showmode = false
vim.opt.shortmess:append "sI"
vim.o.splitbelow = true
vim.o.splitright = true
vim.o.timeoutlen = 400
vim.opt.whichwrap:append "<>[]hl"
vim.g.loaded_node_provider = 0
vim.g.loaded_python3_provider = 0
vim.g.loaded_perl_provider = 0
vim.g.loaded_ruby_provider = 0
local is_windows = vim.fn.has "win32" ~= 0
local sep = is_windows and "\\" or "/"
local delim = is_windows and ";" or ":"
vim.env.PATH = table.concat({ vim.fn.stdpath "data", "mason", "bin" }, sep) .. delim .. vim.env.PATH
+86 -246
View File
@@ -1,120 +1,115 @@
return {
{
"vhyrro/luarocks.nvim",
priority = 1000,
config = true,
},
{
"cameronr/auto-session",
opts = function()
return require "configs.auto-session"
"nvim-treesitter/nvim-treesitter",
config = function()
require("config.treesitter")
end,
},
{
"stevearc/conform.nvim",
-- event = 'BufWritePre', -- uncomment for format on save
opts = require "configs.conform",
"rmagatti/auto-session",
config = function()
require("config.autosession")
end,
},
{ "hiphish/rainbow-delimiters.nvim" },
{
"NeogitOrg/neogit",
"neoclide/coc.nvim",
branch = 'release',
},
{
"sainnhe/gruvbox-material",
},
{
"navarasu/onedark.nvim",
config = function()
require("config.themelight")
end,
},
{
"nvim-telescope/telescope.nvim",
dependencies = {
"nvim-lua/plenary.nvim", -- required
"sindrets/diffview.nvim", -- optional - Diff integration
-- Only one of these is needed.
"nvim-telescope/telescope.nvim", -- optional
"ibhagwan/fzf-lua", -- optional
"echasnovski/mini.pick", -- optional
"nvim-lua/plenary.nvim",
},
config = function()
require "configs.neogit"
require("config.telescope")
end,
},
{
"lambdalisue/vim-suda",
},
{
"nvim-tree/nvim-web-devicons",
},
{
"nvim-tree/nvim-tree.lua",
cmd = { "NvimTreeToggle", "NvimTreeFocus" },
config = function()
require("config.nvimtree")
end,
},
{
"romgrk/barbar.nvim",
init = function() vim.g.barbar_auto_setup = false end,
config = function()
require("config.barbar")
end,
},
-- {
-- "itchyny/lightline.vim",
-- },
{
"nvim-lualine/lualine.nvim",
event = "VeryLazy",
config = function ()
require("config.lualine")
end,
},
{
"shinchu/lightline-gruvbox.vim",
},
{
"jiaoshijie/undotree",
config = function()
require("config.undotree")
end,
},
{
"lukas-reineke/indent-blankline.nvim",
main = "ibl",
---@module "ibl"
---@type ibl.config
config = function()
require("config.indent-blankline")
end,
},
{
"hiphish/rainbow-delimiters.nvim",
},
{
"windwp/nvim-autopairs",
event = "InsertEnter",
config = function()
require("config.autopairs")
end,
},
{
"tpope/vim-fugitive",
},
{
"mbbill/undotree",
},
{
"andweeb/presence.nvim",
},
{
"kwkarlwang/bufresize.nvim",
config = function()
require "configs.bufresize"
end,
},
{
"nvim-focus/focus.nvim",
config = function()
require "configs.focus"
end,
},
{
"mfussenegger/nvim-dap",
config = function()
require "configs.dap"
end,
},
{
"neovim/nvim-lspconfig",
dependencies = {
"williamboman/mason.nvim",
"williamboman/mason-lspconfig.nvim",
"hrsh7th/cmp-nvim-lsp",
"hrsh7th/cmp-buffer",
"hrsh7th/cmp-path",
"hrsh7th/cmp-cmdline",
"hrsh7th/nvim-cmp",
"L3MON4D3/LuaSnip",
"saadparwaiz1/cmp_luasnip",
"j-hui/fidget.nvim",
},
config = function()
require "configs.lspconfig"
end,
},
{ "lambdalisue/vim-suda" },
{
"rcarriga/nvim-notify",
config = function()
require "configs.notify"
require "config.notify"
end,
},
{
"ojroques/nvim-bufdel",
opts = {
next = 'tabs',
quit = true,
},
},
{
"zbirenbaum/copilot.lua",
lazy = true,
cmd = "Copilot",
event = "InsertEnter",
config = function()
require "configs.copilot"
require "config.copilot"
end,
},
{
"CopilotC-Nvim/CopilotChat.nvim",
dependencies = {
@@ -123,168 +118,13 @@ return {
},
build = "make tiktoken", -- Only on MacOS or Linux
config = function()
require "configs.copilotchat"
end,
},
{
"smolck/command-completion.nvim",
opts = {
border = nil,
highlight_selection = true,
use_matchfuzzy = true,
},
},
{
"nvim-treesitter/nvim-treesitter",
opts = function()
require "configs.treesitter"
require "config.copilotchat"
end,
},
{
"nvchad/base46",
build = function()
require("base46").load_all_highlights()
end,
},
{
"nvchad/ui",
lazy = false,
"mfussenegger/nvim-dap",
config = function()
require "nvchad"
require "config.dap"
end,
},
"nvzone/volt",
"nvzone/menu",
{ "nvzone/minty", cmd = { "Huefy", "Shades" } },
{
"nvim-tree/nvim-web-devicons",
opts = function()
dofile(vim.g.base46_cache .. "devicons")
return { override = require "nvchad.icons.devicons" }
end,
},
{
"lukas-reineke/indent-blankline.nvim",
event = "User FilePost",
opts = {
indent = { char = "", highlight = "IblChar" },
scope = { char = "", highlight = "IblScopeChar" },
},
config = function(_, opts)
dofile(vim.g.base46_cache .. "blankline")
local hooks = require "ibl.hooks"
hooks.register(hooks.type.WHITESPACE, hooks.builtin.hide_first_space_indent_level)
require("ibl").setup(opts)
dofile(vim.g.base46_cache .. "blankline")
end,
},
-- file managing , picker etc
{
"nvim-tree/nvim-tree.lua",
cmd = { "NvimTreeToggle", "NvimTreeFocus" },
opts = function()
return require "nvchad.configs.nvimtree"
end,
},
{
"folke/which-key.nvim",
keys = { "<leader>", "<c-w>", '"', "'", "`", "c", "v", "g" },
cmd = "WhichKey",
opts = function()
dofile(vim.g.base46_cache .. "whichkey")
return {}
end,
},
-- git stuff
{
"lewis6991/gitsigns.nvim",
event = "User FilePost",
opts = function()
return require "nvchad.configs.gitsigns"
end,
},
-- lsp stuff
{
"williamboman/mason.nvim",
cmd = { "Mason", "MasonInstall", "MasonUpdate" },
opts = function()
return require "nvchad.configs.mason"
end,
},
-- load luasnips + cmp related in insert mode only
{
"hrsh7th/nvim-cmp",
event = "InsertEnter",
dependencies = {
{
-- snippet plugin
"L3MON4D3/LuaSnip",
dependencies = "rafamadriz/friendly-snippets",
opts = { history = true, updateevents = "TextChanged,TextChangedI" },
config = function(_, opts)
require("luasnip").config.set_config(opts)
require "nvchad.configs.luasnip"
end,
},
-- autopairing of (){}[] etc
{
"windwp/nvim-autopairs",
opts = {
fast_wrap = {},
disable_filetype = { "TelescopePrompt", "vim" },
},
config = function(_, opts)
require("nvim-autopairs").setup(opts)
-- setup cmp for autopairs
local cmp_autopairs = require "nvim-autopairs.completion.cmp"
require("cmp").event:on("confirm_done", cmp_autopairs.on_confirm_done())
end,
},
-- cmp sources plugins
{
"saadparwaiz1/cmp_luasnip",
"hrsh7th/cmp-nvim-lua",
"hrsh7th/cmp-nvim-lsp",
"hrsh7th/cmp-buffer",
"hrsh7th/cmp-path",
"FelipeLema/cmp-async-path"
},
},
opts = function()
return require "configs.cmp"
end,
},
{
"nvim-telescope/telescope.nvim",
dependencies = { "nvim-treesitter/nvim-treesitter" },
cmd = "Telescope",
opts = function()
return require "nvchad.configs.telescope"
end,
},
-- {
-- "nvim-neorg/neorg",
-- dependencies = "3rd/image.nvim",
-- config = function()
-- require "configs.neorg"
-- end,
-- },
}