2021-09-03 10:03:25 -04:00
|
|
|
-- IMPORTANT NOTE : This is default config, so dont change anything here.
|
|
|
|
-- use custom/chadrc.lua instead
|
2021-08-18 01:40:13 -04:00
|
|
|
|
2021-08-17 14:32:48 -04:00
|
|
|
local M = {}
|
|
|
|
|
|
|
|
M.options = {
|
2021-11-14 02:13:36 -05:00
|
|
|
-- custom = {}
|
|
|
|
-- general nvim/vim options , check :h optionname to know more about an option
|
|
|
|
|
2021-08-22 03:49:15 -04:00
|
|
|
clipboard = "unnamedplus",
|
|
|
|
cmdheight = 1,
|
2021-09-19 04:11:28 -04:00
|
|
|
ruler = false,
|
2021-08-17 14:32:48 -04:00
|
|
|
hidden = true,
|
|
|
|
ignorecase = true,
|
2021-10-21 17:36:23 -04:00
|
|
|
smartcase = true,
|
2021-08-22 03:49:15 -04:00
|
|
|
mapleader = " ",
|
2021-08-17 14:32:48 -04:00
|
|
|
mouse = "a",
|
|
|
|
number = true,
|
|
|
|
numberwidth = 2,
|
2021-09-19 04:11:28 -04:00
|
|
|
relativenumber = false,
|
|
|
|
expandtab = true,
|
2021-08-17 14:32:48 -04:00
|
|
|
shiftwidth = 2,
|
|
|
|
smartindent = true,
|
2021-11-14 02:13:36 -05:00
|
|
|
tabstop = 8,
|
2021-08-22 03:49:15 -04:00
|
|
|
timeoutlen = 400,
|
|
|
|
updatetime = 250,
|
2021-11-14 02:13:36 -05:00
|
|
|
undofile = true,
|
|
|
|
|
2021-09-19 04:11:28 -04:00
|
|
|
-- NvChad options
|
|
|
|
nvChad = {
|
|
|
|
copy_cut = true, -- copy cut text ( x key ), visual and normal mode
|
|
|
|
copy_del = true, -- copy deleted text ( dd key ), visual and normal mode
|
|
|
|
insert_nav = true, -- navigation in insertmode
|
|
|
|
window_nav = true,
|
|
|
|
theme_toggler = false,
|
2021-11-14 02:13:36 -05:00
|
|
|
|
|
|
|
-- updater
|
2021-09-19 04:11:28 -04:00
|
|
|
update_url = "https://github.com/NvChad/NvChad",
|
|
|
|
update_branch = "main",
|
|
|
|
},
|
2021-08-22 02:28:15 -04:00
|
|
|
}
|
2021-08-22 03:49:15 -04:00
|
|
|
|
2021-11-14 02:13:36 -05:00
|
|
|
---- UI -----
|
|
|
|
|
2021-09-19 04:11:28 -04:00
|
|
|
M.ui = {
|
2021-11-14 02:13:36 -05:00
|
|
|
hl_override = "", -- path of your file that contains highlights
|
2021-09-19 04:11:28 -04:00
|
|
|
italic_comments = false,
|
2021-11-14 02:13:36 -05:00
|
|
|
theme = "onedark", -- default theme
|
2021-09-19 04:11:28 -04:00
|
|
|
-- toggle between two themes, see theme_toggler mappings
|
|
|
|
theme_toggler = {
|
|
|
|
"onedark",
|
|
|
|
"gruvchad",
|
|
|
|
},
|
2021-11-14 02:13:36 -05:00
|
|
|
|
|
|
|
-- Change terminal bg to nvim theme's bg color so it'll match well
|
2021-09-19 04:11:28 -04:00
|
|
|
-- For Ex : if you have onedark set in nvchad, set onedark's bg color on your terminal
|
|
|
|
transparency = false,
|
2021-08-17 14:32:48 -04:00
|
|
|
}
|
2021-09-24 12:25:44 -04:00
|
|
|
|
2021-11-14 02:13:36 -05:00
|
|
|
---- PLUGIN OPTIONS ----
|
|
|
|
|
2021-09-19 04:11:28 -04:00
|
|
|
M.plugins = {
|
2021-11-14 02:13:36 -05:00
|
|
|
-- enable/disable plugins (false for disable)
|
2021-10-01 22:50:17 -04:00
|
|
|
status = {
|
2021-11-14 02:13:36 -05:00
|
|
|
blankline = true, -- indentline stuff
|
|
|
|
bufferline = true, -- manage and preview opened buffers
|
2021-09-24 12:25:44 -04:00
|
|
|
colorizer = false, -- color RGB, HEX, CSS, NAME color codes
|
|
|
|
comment = true, -- easily (un)comment code, language aware
|
2021-11-14 02:13:36 -05:00
|
|
|
dashboard = false,
|
2021-09-24 12:25:44 -04:00
|
|
|
esc_insertmode = true, -- map to <ESC> with no lag
|
|
|
|
feline = true, -- statusline
|
2021-11-14 02:13:36 -05:00
|
|
|
gitsigns = true,
|
2021-09-24 12:25:44 -04:00
|
|
|
lspsignature = true, -- lsp enhancements
|
2021-11-14 02:13:36 -05:00
|
|
|
telescope_media = false,
|
|
|
|
vim_matchup = true, -- improved matchit
|
2021-09-25 21:51:07 -04:00
|
|
|
cmp = true,
|
2021-10-01 22:50:17 -04:00
|
|
|
nvimtree = true,
|
2021-10-21 20:17:35 -04:00
|
|
|
autopairs = true,
|
2021-09-24 12:25:44 -04:00
|
|
|
},
|
|
|
|
options = {
|
2021-11-05 10:34:52 -04:00
|
|
|
autopairs = { loadAfter = "nvim-cmp" },
|
2021-09-24 12:25:44 -04:00
|
|
|
lspconfig = {
|
2021-09-30 00:21:00 -04:00
|
|
|
setup_lspconf = "", -- path of file containing setups of different lsps
|
2021-09-24 12:25:44 -04:00
|
|
|
},
|
|
|
|
nvimtree = {
|
|
|
|
enable_git = 0,
|
|
|
|
},
|
2021-09-25 21:33:00 -04:00
|
|
|
luasnip = {
|
|
|
|
snippet_path = {},
|
|
|
|
},
|
2021-11-14 02:13:36 -05:00
|
|
|
statusline = {
|
|
|
|
-- hide, show on specific filetypes
|
2021-09-24 12:25:44 -04:00
|
|
|
hidden = {
|
|
|
|
"help",
|
|
|
|
"dashboard",
|
|
|
|
"NvimTree",
|
|
|
|
"terminal",
|
|
|
|
},
|
|
|
|
shown = {},
|
2021-11-14 02:13:36 -05:00
|
|
|
|
|
|
|
-- truncate statusline on small screens
|
|
|
|
shortline = true,
|
|
|
|
style = "default", -- default, round , slant , block , arrow
|
2021-09-19 04:11:28 -04:00
|
|
|
},
|
2021-09-24 12:25:44 -04:00
|
|
|
esc_insertmode_timeout = 300,
|
|
|
|
},
|
|
|
|
default_plugin_config_replace = {},
|
2021-08-17 14:32:48 -04:00
|
|
|
}
|
|
|
|
|
2021-11-14 02:13:36 -05:00
|
|
|
-- Don't use a single keymap twice
|
|
|
|
|
|
|
|
--- MAPPINGS ----
|
|
|
|
|
|
|
|
-- non plugin
|
2021-08-17 14:32:48 -04:00
|
|
|
M.mappings = {
|
2021-11-14 02:13:36 -05:00
|
|
|
-- custom = {}, -- custom user mappings
|
|
|
|
|
|
|
|
misc = {
|
|
|
|
close_buffer = "<leader>x",
|
|
|
|
copy_whole_file = "<C-a>", -- copy all contents of current buffer
|
|
|
|
line_number_toggle = "<leader>n", -- toggle line number
|
|
|
|
update_nvchad = "<leader>uu",
|
|
|
|
new_buffer = "<S-t>",
|
|
|
|
new_tab = "<C-t>b",
|
|
|
|
save_file = "<C-s>", -- save file using :w
|
|
|
|
theme_toggler = "<leader>tt", -- see in ui.theme_toggler
|
|
|
|
},
|
|
|
|
|
2021-08-22 03:49:15 -04:00
|
|
|
-- navigation in insert mode, only if enabled in options
|
2021-11-14 02:13:36 -05:00
|
|
|
|
2021-08-17 14:32:48 -04:00
|
|
|
insert_nav = {
|
|
|
|
backward = "<C-h>",
|
|
|
|
end_of_line = "<C-e>",
|
2021-08-22 03:49:15 -04:00
|
|
|
forward = "<C-l>",
|
2021-08-17 14:32:48 -04:00
|
|
|
next_line = "<C-k>",
|
2021-08-22 03:49:15 -04:00
|
|
|
prev_line = "<C-j>",
|
2021-10-16 11:54:17 -04:00
|
|
|
beginning_of_line = "<C-a>",
|
2021-08-22 03:49:15 -04:00
|
|
|
},
|
2021-11-14 02:13:36 -05:00
|
|
|
|
|
|
|
-- better window movement
|
2021-09-04 00:34:16 -04:00
|
|
|
window_nav = {
|
|
|
|
moveLeft = "<C-h>",
|
|
|
|
moveRight = "<C-l>",
|
|
|
|
moveUp = "<C-k>",
|
|
|
|
moveDown = "<C-j>",
|
2021-09-24 12:25:44 -04:00
|
|
|
},
|
2021-11-14 02:13:36 -05:00
|
|
|
|
2021-08-22 03:49:15 -04:00
|
|
|
-- terminal related mappings
|
|
|
|
terminal = {
|
2021-11-14 02:13:36 -05:00
|
|
|
-- multiple mappings can be given for esc_termmode, esc_hide_termmode
|
|
|
|
|
2021-08-22 03:49:15 -04:00
|
|
|
-- get out of terminal mode
|
2021-11-14 02:13:36 -05:00
|
|
|
esc_termmode = { "jk" },
|
|
|
|
|
2021-08-22 03:49:15 -04:00
|
|
|
-- get out of terminal mode and hide it
|
2021-11-14 02:13:36 -05:00
|
|
|
esc_hide_termmode = { "JK" },
|
2021-09-19 04:11:28 -04:00
|
|
|
-- show & recover hidden terminal buffers in a telescope picker
|
2021-08-22 03:49:15 -04:00
|
|
|
pick_term = "<leader>W",
|
2021-11-14 02:13:36 -05:00
|
|
|
|
|
|
|
-- spawn terminals
|
2021-08-22 03:49:15 -04:00
|
|
|
new_horizontal = "<leader>h",
|
|
|
|
new_vertical = "<leader>v",
|
|
|
|
new_window = "<leader>w",
|
2021-08-17 14:32:48 -04:00
|
|
|
},
|
2021-08-22 02:28:15 -04:00
|
|
|
}
|
2021-08-22 03:49:15 -04:00
|
|
|
|
2021-11-14 02:13:36 -05:00
|
|
|
-- plugins related mappings
|
|
|
|
|
2021-09-19 04:11:28 -04:00
|
|
|
M.mappings.plugins = {
|
2021-08-22 02:28:15 -04:00
|
|
|
bufferline = {
|
2021-11-14 02:13:36 -05:00
|
|
|
next_buffer = "<TAB>",
|
|
|
|
prev_buffer = "<S-Tab>",
|
2021-08-22 02:28:15 -04:00
|
|
|
},
|
|
|
|
comment = {
|
2021-11-14 02:13:36 -05:00
|
|
|
toggle = "<leader>/",
|
2021-08-22 02:28:15 -04:00
|
|
|
},
|
2021-11-14 02:13:36 -05:00
|
|
|
|
2021-08-22 02:28:15 -04:00
|
|
|
dashboard = {
|
|
|
|
bookmarks = "<leader>bm",
|
|
|
|
new_file = "<leader>fn", -- basically create a new buffer
|
|
|
|
open = "<leader>db", -- open dashboard
|
2021-11-14 02:13:36 -05:00
|
|
|
session_load = "<leader>l",
|
|
|
|
session_save = "<leader>s",
|
2021-08-22 02:28:15 -04:00
|
|
|
},
|
2021-11-14 02:13:36 -05:00
|
|
|
|
2021-09-19 04:11:28 -04:00
|
|
|
-- map to <ESC> with no lag
|
|
|
|
better_escape = { -- <ESC> will still work
|
2021-08-22 02:28:15 -04:00
|
|
|
esc_insertmode = { "jk" }, -- multiple mappings allowed
|
|
|
|
},
|
2021-11-14 02:13:36 -05:00
|
|
|
|
2021-08-22 02:28:15 -04:00
|
|
|
nvimtree = {
|
2021-08-23 07:14:52 -04:00
|
|
|
toggle = "<C-n>",
|
2021-08-28 22:37:02 -04:00
|
|
|
focus = "<leader>e",
|
2021-08-22 02:28:15 -04:00
|
|
|
},
|
2021-11-14 02:13:36 -05:00
|
|
|
|
2021-08-22 02:28:15 -04:00
|
|
|
telescope = {
|
|
|
|
buffers = "<leader>fb",
|
|
|
|
find_files = "<leader>ff",
|
2021-08-24 20:06:44 -04:00
|
|
|
find_hiddenfiles = "<leader>fa",
|
2021-08-22 02:28:15 -04:00
|
|
|
git_commits = "<leader>cm",
|
|
|
|
git_status = "<leader>gt",
|
|
|
|
help_tags = "<leader>fh",
|
|
|
|
live_grep = "<leader>fw",
|
|
|
|
oldfiles = "<leader>fo",
|
2021-09-19 04:11:28 -04:00
|
|
|
themes = "<leader>th", -- NvChad theme picker
|
2021-11-14 02:13:36 -05:00
|
|
|
|
2021-09-19 04:11:28 -04:00
|
|
|
telescope_media = {
|
|
|
|
media_files = "<leader>fp",
|
|
|
|
},
|
2021-08-22 02:28:15 -04:00
|
|
|
},
|
2021-08-17 14:32:48 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
return M
|