mirror of https://github.com/NvChad/NvChad
Merge pull request #156 from Akianonymus/main
Major perf improvements | Handle errors | Better configs | Miscpull/160/head
commit
6f2b358d3a
@ -1,20 +1,28 @@
|
||||
-- load all plugins
|
||||
require "pluginList"
|
||||
-- load all options
|
||||
require "options"
|
||||
|
||||
local g = vim.g
|
||||
-- only try to load stuff if atleast base16 is initialized
|
||||
-- TODO: Find a better way to trigger PackerSync
|
||||
if require "theme" then
|
||||
local async
|
||||
async =
|
||||
vim.loop.new_async(
|
||||
vim.schedule_wrap(
|
||||
function()
|
||||
require "pluginList"
|
||||
require "plugins.bufferline"
|
||||
require "highlights"
|
||||
require "mappings"
|
||||
require("utils").hideStuff()
|
||||
|
||||
g.mapleader = " "
|
||||
g.auto_save = false
|
||||
|
||||
-- colorscheme related stuff
|
||||
|
||||
g.nvchad_theme = "onedark"
|
||||
local base16 = require "base16"
|
||||
base16(base16.themes["onedark"], true)
|
||||
|
||||
require "highlights"
|
||||
require "mappings"
|
||||
require "plugins.bufferline"
|
||||
|
||||
require("utils").hideStuff()
|
||||
async:close()
|
||||
end
|
||||
)
|
||||
)
|
||||
async:send()
|
||||
else
|
||||
-- otherwise run packer sync
|
||||
require "pluginList"
|
||||
print("Now PackerSync will be executed, after completion, restart neovim.\n")
|
||||
vim.cmd("PackerSync")
|
||||
end
|
||||
|
@ -0,0 +1,45 @@
|
||||
local packer
|
||||
if
|
||||
not pcall(
|
||||
function()
|
||||
packer = require "packer"
|
||||
end
|
||||
)
|
||||
then
|
||||
local packer_path = vim.fn.stdpath("data") .. "/site/pack/packer/start/packer.nvim"
|
||||
|
||||
print("Cloning packer..")
|
||||
-- remove the dir before cloning
|
||||
vim.fn.delete(packer_path, "rf")
|
||||
vim.fn.system(
|
||||
{
|
||||
"git",
|
||||
"clone",
|
||||
"https://github.com/wbthomason/packer.nvim",
|
||||
"--depth",
|
||||
"20",
|
||||
packer_path
|
||||
}
|
||||
)
|
||||
if pcall(
|
||||
function()
|
||||
packer = require "packer"
|
||||
end
|
||||
)
|
||||
then
|
||||
print("Packer cloned successfully.")
|
||||
else
|
||||
error("Couldn't clone packer !\nPacker path: " .. packer_path)
|
||||
end
|
||||
end
|
||||
|
||||
return packer.init {
|
||||
display = {
|
||||
open_fn = function()
|
||||
return require("packer.util").float {border = "single"}
|
||||
end
|
||||
},
|
||||
git = {
|
||||
clone_timeout = 600 -- Timeout, in seconds, for git clones
|
||||
}
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
local autopairs, autopairs_completion
|
||||
if
|
||||
not pcall(
|
||||
function()
|
||||
autopairs = require "nvim-autopairs"
|
||||
autopairs_completion = require "nvim-autopairs.completion.compe"
|
||||
end
|
||||
)
|
||||
then
|
||||
return
|
||||
end
|
||||
|
||||
autopairs.setup()
|
||||
autopairs_completion.setup(
|
||||
{
|
||||
map_cr = true,
|
||||
map_complete = true -- insert () func completion
|
||||
}
|
||||
)
|
@ -0,0 +1,27 @@
|
||||
-- autosave.nvim plugin disabled by default
|
||||
local autosave
|
||||
if
|
||||
not pcall(
|
||||
function()
|
||||
func = require "autosave"
|
||||
end
|
||||
)
|
||||
then
|
||||
return
|
||||
end
|
||||
|
||||
autosave.setup(
|
||||
{
|
||||
enabled = vim.g.auto_save, -- takes boolean value from init.lua
|
||||
execution_message = "autosaved at : " .. vim.fn.strftime("%H:%M:%S"),
|
||||
events = {"InsertLeave", "TextChanged"},
|
||||
conditions = {
|
||||
exists = true,
|
||||
filetype_is_not = {},
|
||||
modifiable = true
|
||||
},
|
||||
write_all_buffers = true,
|
||||
on_off_commands = true,
|
||||
clean_command_line_interval = 2500
|
||||
}
|
||||
)
|
@ -0,0 +1,9 @@
|
||||
-- blankline config
|
||||
vim.g.indentLine_enabled = 1
|
||||
vim.g.indent_blankline_char = "▏"
|
||||
|
||||
vim.g.indent_blankline_filetype_exclude = {"help", "terminal", "dashboard"}
|
||||
vim.g.indent_blankline_buftype_exclude = {"terminal"}
|
||||
|
||||
vim.g.indent_blankline_show_trailing_blankline_indent = false
|
||||
vim.g.indent_blankline_show_first_indent_level = false
|
@ -0,0 +1,13 @@
|
||||
local colorizer
|
||||
if
|
||||
not pcall(
|
||||
function()
|
||||
colorizer = require("colorizer")
|
||||
end
|
||||
)
|
||||
then
|
||||
return
|
||||
end
|
||||
|
||||
colorizer.setup()
|
||||
vim.cmd("ColorizerReloadAllBuffers")
|
@ -0,0 +1,5 @@
|
||||
pcall(
|
||||
function()
|
||||
require("nvim_comment").setup()
|
||||
end
|
||||
)
|
@ -1,38 +1,31 @@
|
||||
local M = {}
|
||||
|
||||
M.config = function()
|
||||
require "compe".setup {
|
||||
enabled = true,
|
||||
autocomplete = true,
|
||||
debug = false,
|
||||
min_length = 1,
|
||||
preselect = "enable",
|
||||
throttle_time = 80,
|
||||
source_timeout = 200,
|
||||
incomplete_delay = 400,
|
||||
max_abbr_width = 100,
|
||||
max_kind_width = 100,
|
||||
max_menu_width = 100,
|
||||
documentation = true,
|
||||
source = {
|
||||
buffer = {kind = "", true},
|
||||
luasnip = {kind = "", true},
|
||||
nvim_lsp = true,
|
||||
nvim_lua = true
|
||||
}
|
||||
}
|
||||
end
|
||||
|
||||
M.snippets = function()
|
||||
local ls = require("luasnip")
|
||||
|
||||
ls.config.set_config(
|
||||
{
|
||||
history = true,
|
||||
updateevents = "TextChanged,TextChangedI"
|
||||
}
|
||||
local compe
|
||||
if
|
||||
not pcall(
|
||||
function()
|
||||
compe = require "compe"
|
||||
end
|
||||
)
|
||||
require("luasnip/loaders/from_vscode").load()
|
||||
then
|
||||
return
|
||||
end
|
||||
|
||||
return M
|
||||
compe.setup {
|
||||
enabled = true,
|
||||
autocomplete = true,
|
||||
debug = false,
|
||||
min_length = 1,
|
||||
preselect = "enable",
|
||||
throttle_time = 80,
|
||||
source_timeout = 200,
|
||||
incomplete_delay = 400,
|
||||
max_abbr_width = 100,
|
||||
max_kind_width = 100,
|
||||
max_menu_width = 100,
|
||||
documentation = true,
|
||||
source = {
|
||||
buffer = {kind = "", true},
|
||||
luasnip = {kind = "", true},
|
||||
nvim_lsp = true,
|
||||
nvim_lua = true
|
||||
}
|
||||
}
|
||||
|
@ -1,46 +1,40 @@
|
||||
local M = {}
|
||||
local g = vim.g
|
||||
local fn = vim.fn
|
||||
|
||||
M.config = function()
|
||||
local g = vim.g
|
||||
local fn = vim.fn
|
||||
local plugins_count = fn.len(fn.globpath("~/.local/share/nvim/site/pack/packer/start", "*", 0, 1))
|
||||
|
||||
local plugins_count = fn.len(fn.globpath("~/.local/share/nvim/site/pack/packer/start", "*", 0, 1))
|
||||
g.dashboard_disable_at_vimenter = 1 -- dashboard is disabled by default
|
||||
g.dashboard_disable_statusline = 1
|
||||
g.dashboard_default_executive = "telescope"
|
||||
g.dashboard_custom_header = {
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ⣴⣶⣤⡤⠦⣤⣀⣤⠆ ⣈⣭⣿⣶⣿⣦⣼⣆ ",
|
||||
" ⠉⠻⢿⣿⠿⣿⣿⣶⣦⠤⠄⡠⢾⣿⣿⡿⠋⠉⠉⠻⣿⣿⡛⣦ ",
|
||||
" ⠈⢿⣿⣟⠦ ⣾⣿⣿⣷ ⠻⠿⢿⣿⣧⣄ ",
|
||||
" ⣸⣿⣿⢧ ⢻⠻⣿⣿⣷⣄⣀⠄⠢⣀⡀⠈⠙⠿⠄ ",
|
||||
" ⢠⣿⣿⣿⠈ ⣻⣿⣿⣿⣿⣿⣿⣿⣛⣳⣤⣀⣀ ",
|
||||
" ⢠⣧⣶⣥⡤⢄ ⣸⣿⣿⠘ ⢀⣴⣿⣿⡿⠛⣿⣿⣧⠈⢿⠿⠟⠛⠻⠿⠄ ",
|
||||
" ⣰⣿⣿⠛⠻⣿⣿⡦⢹⣿⣷ ⢊⣿⣿⡏ ⢸⣿⣿⡇ ⢀⣠⣄⣾⠄ ",
|
||||
" ⣠⣿⠿⠛ ⢀⣿⣿⣷⠘⢿⣿⣦⡀ ⢸⢿⣿⣿⣄ ⣸⣿⣿⡇⣪⣿⡿⠿⣿⣷⡄ ",
|
||||
" ⠙⠃ ⣼⣿⡟ ⠈⠻⣿⣿⣦⣌⡇⠻⣿⣿⣷⣿⣿⣿ ⣿⣿⡇ ⠛⠻⢷⣄ ",
|
||||
" ⢻⣿⣿⣄ ⠈⠻⣿⣿⣿⣷⣿⣿⣿⣿⣿⡟ ⠫⢿⣿⡆ ",
|
||||
" ⠻⣿⣿⣿⣿⣶⣶⣾⣿⣿⣿⣿⣿⣿⣿⣿⡟⢀⣀⣤⣾⡿⠃ ",
|
||||
" "
|
||||
}
|
||||
|
||||
g.dashboard_disable_at_vimenter = 1 -- dashboard is disabled by default
|
||||
g.dashboard_disable_statusline = 1
|
||||
g.dashboard_default_executive = "telescope"
|
||||
g.dashboard_custom_header = {
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ⣴⣶⣤⡤⠦⣤⣀⣤⠆ ⣈⣭⣿⣶⣿⣦⣼⣆ ",
|
||||
" ⠉⠻⢿⣿⠿⣿⣿⣶⣦⠤⠄⡠⢾⣿⣿⡿⠋⠉⠉⠻⣿⣿⡛⣦ ",
|
||||
" ⠈⢿⣿⣟⠦ ⣾⣿⣿⣷ ⠻⠿⢿⣿⣧⣄ ",
|
||||
" ⣸⣿⣿⢧ ⢻⠻⣿⣿⣷⣄⣀⠄⠢⣀⡀⠈⠙⠿⠄ ",
|
||||
" ⢠⣿⣿⣿⠈ ⣻⣿⣿⣿⣿⣿⣿⣿⣛⣳⣤⣀⣀ ",
|
||||
" ⢠⣧⣶⣥⡤⢄ ⣸⣿⣿⠘ ⢀⣴⣿⣿⡿⠛⣿⣿⣧⠈⢿⠿⠟⠛⠻⠿⠄ ",
|
||||
" ⣰⣿⣿⠛⠻⣿⣿⡦⢹⣿⣷ ⢊⣿⣿⡏ ⢸⣿⣿⡇ ⢀⣠⣄⣾⠄ ",
|
||||
" ⣠⣿⠿⠛ ⢀⣿⣿⣷⠘⢿⣿⣦⡀ ⢸⢿⣿⣿⣄ ⣸⣿⣿⡇⣪⣿⡿⠿⣿⣷⡄ ",
|
||||
" ⠙⠃ ⣼⣿⡟ ⠈⠻⣿⣿⣦⣌⡇⠻⣿⣿⣷⣿⣿⣿ ⣿⣿⡇ ⠛⠻⢷⣄ ",
|
||||
" ⢻⣿⣿⣄ ⠈⠻⣿⣿⣿⣷⣿⣿⣿⣿⣿⡟ ⠫⢿⣿⡆ ",
|
||||
" ⠻⣿⣿⣿⣿⣶⣶⣾⣿⣿⣿⣿⣿⣿⣿⣿⡟⢀⣀⣤⣾⡿⠃ ",
|
||||
" "
|
||||
}
|
||||
g.dashboard_custom_section = {
|
||||
a = {description = {" Find File SPC f f"}, command = "Telescope find_files"},
|
||||
b = {description = {" Recents SPC f o"}, command = "Telescope oldfiles"},
|
||||
c = {description = {" Find Word SPC f w"}, command = "Telescope live_grep"},
|
||||
d = {description = {"洛 New File SPC f n"}, command = "DashboardNewFile"},
|
||||
e = {description = {" Bookmarks SPC b m"}, command = "Telescope marks"},
|
||||
f = {description = {" Load Last Session SPC s l"}, command = "SessionLoad"}
|
||||
}
|
||||
|
||||
g.dashboard_custom_section = {
|
||||
a = {description = {" Find File SPC f f"}, command = "Telescope find_files"},
|
||||
b = {description = {" Recents SPC f o"}, command = "Telescope oldfiles"},
|
||||
c = {description = {" Find Word SPC f w"}, command = "Telescope live_grep"},
|
||||
d = {description = {"洛 New File SPC f n"}, command = "DashboardNewFile"},
|
||||
e = {description = {" Bookmarks SPC b m"}, command = "Telescope marks"},
|
||||
f = {description = {" Load Last Session SPC s l"}, command = "SessionLoad"}
|
||||
}
|
||||
|
||||
g.dashboard_custom_footer = {
|
||||
" ",
|
||||
-- "NvChad Loaded " .. plugins_count .. " plugins",
|
||||
"NvChad v0.5"
|
||||
}
|
||||
end
|
||||
|
||||
return M
|
||||
g.dashboard_custom_footer = {
|
||||
" ",
|
||||
-- "NvChad Loaded " .. plugins_count .. " plugins",
|
||||
"NvChad v0.5"
|
||||
}
|
||||
|
@ -1,33 +1,38 @@
|
||||
local M = {}
|
||||
|
||||
M.config = function()
|
||||
require("gitsigns").setup {
|
||||
signs = {
|
||||
add = {hl = "DiffAdd", text = "│", numhl = "GitSignsAddNr"},
|
||||
change = {hl = "DiffChange", text = "│", numhl = "GitSignsChangeNr"},
|
||||
delete = {hl = "DiffDelete", text = "_", numhl = "GitSignsDeleteNr"},
|
||||
topdelete = {hl = "DiffDelete", text = "‾", numhl = "GitSignsDeleteNr"},
|
||||
changedelete = {hl = "DiffChange", text = "~", numhl = "GitSignsChangeNr"}
|
||||
},
|
||||
numhl = false,
|
||||
keymaps = {
|
||||
-- Default keymap options
|
||||
noremap = true,
|
||||
buffer = true,
|
||||
["n ]c"] = {expr = true, '&diff ? \']c\' : \'<cmd>lua require"gitsigns".next_hunk()<CR>\''},
|
||||
["n [c"] = {expr = true, '&diff ? \'[c\' : \'<cmd>lua require"gitsigns".prev_hunk()<CR>\''},
|
||||
["n <leader>hs"] = '<cmd>lua require"gitsigns".stage_hunk()<CR>',
|
||||
["n <leader>hu"] = '<cmd>lua require"gitsigns".undo_stage_hunk()<CR>',
|
||||
["n <leader>hr"] = '<cmd>lua require"gitsigns".reset_hunk()<CR>',
|
||||
["n <leader>hp"] = '<cmd>lua require"gitsigns".preview_hunk()<CR>',
|
||||
["n <leader>hb"] = '<cmd>lua require"gitsigns".blame_line()<CR>'
|
||||
},
|
||||
watch_index = {
|
||||
interval = 100
|
||||
},
|
||||
sign_priority = 5,
|
||||
status_formatter = nil -- Use default
|
||||
}
|
||||
local gitsigns
|
||||
if
|
||||
not pcall(
|
||||
function()
|
||||
gitsigns = require "gitsigns"
|
||||
end
|
||||
)
|
||||
then
|
||||
return
|
||||
end
|
||||
|
||||
return M
|
||||
gitsigns.setup {
|
||||
signs = {
|
||||
add = {hl = "DiffAdd", text = "│", numhl = "GitSignsAddNr"},
|
||||
change = {hl = "DiffChange", text = "│", numhl = "GitSignsChangeNr"},
|
||||
delete = {hl = "DiffDelete", text = "_", numhl = "GitSignsDeleteNr"},
|
||||
topdelete = {hl = "DiffDelete", text = "‾", numhl = "GitSignsDeleteNr"},
|
||||
changedelete = {hl = "DiffChange", text = "~", numhl = "GitSignsChangeNr"}
|
||||
},
|
||||
numhl = false,
|
||||
keymaps = {
|
||||
-- Default keymap options
|
||||
noremap = true,
|
||||
buffer = true,
|
||||
["n ]c"] = {expr = true, '&diff ? \']c\' : \'<cmd>lua require"gitsigns".next_hunk()<CR>\''},
|
||||
["n [c"] = {expr = true, '&diff ? \'[c\' : \'<cmd>lua require"gitsigns".prev_hunk()<CR>\''},
|
||||
["n <leader>hs"] = '<cmd>lua require"gitsigns".stage_hunk()<CR>',
|
||||
["n <leader>hu"] = '<cmd>lua require"gitsigns".undo_stage_hunk()<CR>',
|
||||
["n <leader>hr"] = '<cmd>lua require"gitsigns".reset_hunk()<CR>',
|
||||
["n <leader>hp"] = '<cmd>lua require"gitsigns".preview_hunk()<CR>',
|
||||
["n <leader>hb"] = '<cmd>lua require"gitsigns".blame_line()<CR>'
|
||||
},
|
||||
watch_index = {
|
||||
interval = 100
|
||||
},
|
||||
sign_priority = 5,
|
||||
status_formatter = nil -- Use default
|
||||
}
|
||||
|
@ -1,123 +1,128 @@
|
||||
local M = {}
|
||||
local icons
|
||||
if
|
||||
not pcall(
|
||||
function()
|
||||
icons = require "nvim-web-devicons"
|
||||
end
|
||||
)
|
||||
then
|
||||
return
|
||||
end
|
||||
|
||||
M.config = function()
|
||||
local global_theme = "themes/" .. vim.g.nvchad_theme
|
||||
local colors = require(global_theme)
|
||||
local global_theme = "themes/" .. vim.g.nvchad_theme
|
||||
local colors = require(global_theme)
|
||||
|
||||
require "nvim-web-devicons".setup {
|
||||
override = {
|
||||
html = {
|
||||
icon = "",
|
||||
color = colors.baby_pink,
|
||||
name = "html"
|
||||
},
|
||||
css = {
|
||||
icon = "",
|
||||
color = colors.blue,
|
||||
name = "css"
|
||||
},
|
||||
js = {
|
||||
icon = "",
|
||||
color = colors.sun,
|
||||
name = "js"
|
||||
},
|
||||
ts = {
|
||||
icon = "ﯤ",
|
||||
color = colors.teal,
|
||||
name = "ts"
|
||||
},
|
||||
kt = {
|
||||
icon = "",
|
||||
color = colors.orange,
|
||||
name = "kt"
|
||||
},
|
||||
png = {
|
||||
icon = "",
|
||||
color = colors.dark_purple,
|
||||
name = "png"
|
||||
},
|
||||
jpg = {
|
||||
icon = "",
|
||||
color = colors.dark_purple,
|
||||
name = "jpg"
|
||||
},
|
||||
jpeg = {
|
||||
icon = "",
|
||||
color = colors.dark_purple,
|
||||
name = "jpeg"
|
||||
},
|
||||
mp3 = {
|
||||
icon = "",
|
||||
color = colors.white,
|
||||
name = "mp3"
|
||||
},
|
||||
mp4 = {
|
||||
icon = "",
|
||||
color = colors.white,
|
||||
name = "mp4"
|
||||
},
|
||||
out = {
|
||||
icon = "",
|
||||
color = colors.white,
|
||||
name = "out"
|
||||
},
|
||||
Dockerfile = {
|
||||
icon = "",
|
||||
color = colors.cyan,
|
||||
name = "Dockerfile"
|
||||
},
|
||||
rb = {
|
||||
icon = "",
|
||||
color = colors.pink,
|
||||
name = "rb"
|
||||
},
|
||||
vue = {
|
||||
icon = "﵂",
|
||||
color = colors.vibrant_green,
|
||||
name = "vue"
|
||||
},
|
||||
py = {
|
||||
icon = "",
|
||||
color = colors.cyan,
|
||||
name = "py"
|
||||
},
|
||||
toml = {
|
||||
icon = "",
|
||||
color = colors.blue,
|
||||
name = "toml"
|
||||
},
|
||||
lock = {
|
||||
icon = "",
|
||||
color = colors.red,
|
||||
name = "lock"
|
||||
},
|
||||
zip = {
|
||||
icon = "",
|
||||
color = colors.sun,
|
||||
name = "zip"
|
||||
},
|
||||
xz = {
|
||||
icon = "",
|
||||
color = colors.sun,
|
||||
name = "xz"
|
||||
},
|
||||
deb = {
|
||||
icon = "",
|
||||
color = colors.cyan,
|
||||
name = "deb"
|
||||
},
|
||||
rpm = {
|
||||
icon = "",
|
||||
color = colors.orange,
|
||||
name = "rpm"
|
||||
},
|
||||
lua = {
|
||||
icon = "",
|
||||
color = colors.blue,
|
||||
name = "lua"
|
||||
}
|
||||
icons.setup {
|
||||
override = {
|
||||
html = {
|
||||
icon = "",
|
||||
color = colors.baby_pink,
|
||||
name = "html"
|
||||
},
|
||||
css = {
|
||||
icon = "",
|
||||
color = colors.blue,
|
||||
name = "css"
|
||||
},
|
||||
js = {
|
||||
icon = "",
|
||||
color = colors.sun,
|
||||
name = "js"
|
||||
},
|
||||
ts = {
|
||||
icon = "ﯤ",
|
||||
color = colors.teal,
|
||||
name = "ts"
|
||||
},
|
||||
kt = {
|
||||
icon = "",
|
||||
color = colors.orange,
|
||||
name = "kt"
|
||||
},
|
||||
png = {
|
||||
icon = "",
|
||||
color = colors.dark_purple,
|
||||
name = "png"
|
||||
},
|
||||
jpg = {
|
||||
icon = "",
|
||||
color = colors.dark_purple,
|
||||
name = "jpg"
|
||||
},
|
||||
jpeg = {
|
||||
icon = "",
|
||||
color = colors.dark_purple,
|
||||
name = "jpeg"
|
||||
},
|
||||
mp3 = {
|
||||
icon = "",
|
||||
color = colors.white,
|
||||
name = "mp3"
|
||||
},
|
||||
mp4 = {
|
||||
icon = "",
|
||||
color = colors.white,
|
||||
name = "mp4"
|
||||
},
|
||||
out = {
|
||||
icon = "",
|
||||
color = colors.white,
|
||||
name = "out"
|
||||
},
|
||||
Dockerfile = {
|
||||
icon = "",
|
||||
color = colors.cyan,
|
||||
name = "Dockerfile"
|
||||
},
|
||||
rb = {
|
||||
icon = "",
|
||||
color = colors.pink,
|
||||
name = "rb"
|
||||
},
|
||||
vue = {
|
||||
icon = "﵂",
|
||||
color = colors.vibrant_green,
|
||||
name = "vue"
|
||||
},
|
||||
py = {
|
||||
icon = "",
|
||||
color = colors.cyan,
|
||||
name = "py"
|
||||
},
|
||||
toml = {
|
||||
icon = "",
|
||||
color = colors.blue,
|
||||
name = "toml"
|
||||
},
|
||||
lock = {
|
||||
icon = "",
|
||||
color = colors.red,
|
||||
name = "lock"
|
||||
},
|
||||
zip = {
|
||||
icon = "",
|
||||
color = colors.sun,
|
||||
name = "zip"
|
||||
},
|
||||
xz = {
|
||||
icon = "",
|
||||
color = colors.sun,
|
||||
name = "xz"
|
||||
},
|
||||
deb = {
|
||||
icon = "",
|
||||
color = colors.cyan,
|
||||
name = "deb"
|
||||
},
|
||||
rpm = {
|
||||
icon = "",
|
||||
color = colors.orange,
|
||||
name = "rpm"
|
||||
},
|
||||
lua = {
|
||||
icon = "",
|
||||
color = colors.blue,
|
||||
name = "lua"
|
||||
}
|
||||
}
|
||||
end
|
||||
|
||||
return M
|
||||
}
|
||||
|
@ -1,98 +1,102 @@
|
||||
local M = {}
|
||||
|
||||
M.config = function()
|
||||
local lspconf = require("lspconfig")
|
||||
local lspconfig, lspinstall
|
||||
if
|
||||
not pcall(
|
||||
function()
|
||||
lspconfig = require "lspconfig"
|
||||
lspinstall = require "lspinstall"
|
||||
end
|
||||
)
|
||||
then
|
||||
return
|
||||
end
|
||||
|
||||
local function on_attach(client, bufnr)
|
||||
vim.api.nvim_buf_set_option(bufnr, "omnifunc", "v:lua.vim.lsp.omnifunc")
|
||||
local function on_attach(client, bufnr)
|
||||
vim.api.nvim_buf_set_option(bufnr, "omnifunc", "v:lua.vim.lsp.omnifunc")
|
||||
|
||||
local opts = {noremap = true, silent = true}
|
||||
local opts = {noremap = true, silent = true}
|
||||
|
||||
local function buf_set_keymap(...)
|
||||
vim.api.nvim_buf_set_keymap(bufnr, ...)
|
||||
end
|
||||
local function buf_set_keymap(...)
|
||||
vim.api.nvim_buf_set_keymap(bufnr, ...)
|
||||
end
|
||||
|
||||
-- Mappings.
|
||||
-- Mappings.
|
||||
|
||||
buf_set_keymap("n", "gD", "<Cmd>lua vim.lsp.buf.declaration()<CR>", opts)
|
||||
buf_set_keymap("n", "gd", "<Cmd>lua vim.lsp.buf.definition()<CR>", opts)
|
||||
buf_set_keymap("n", "K", "<Cmd>lua vim.lsp.buf.hover()<CR>", opts)
|
||||
buf_set_keymap("n", "gi", "<cmd>lua vim.lsp.buf.implementation()<CR>", opts)
|
||||
buf_set_keymap("n", "<C-k>", "<cmd>lua vim.lsp.buf.signature_help()<CR>", opts)
|
||||
buf_set_keymap("n", "<space>wa", "<cmd>lua vim.lsp.buf.add_workspace_folder()<CR>", opts)
|
||||
buf_set_keymap("n", "<space>wr", "<cmd>lua vim.lsp.buf.remove_workspace_folder()<CR>", opts)
|
||||
buf_set_keymap("n", "<space>wl", "<cmd>lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))<CR>", opts)
|
||||
buf_set_keymap("n", "<space>D", "<cmd>lua vim.lsp.buf.type_definition()<CR>", opts)
|
||||
buf_set_keymap("n", "<space>rn", "<cmd>lua vim.lsp.buf.rename()<CR>", opts)
|
||||
buf_set_keymap("n", "gr", "<cmd>lua vim.lsp.buf.references()<CR>", opts)
|
||||
buf_set_keymap("n", "<space>e", "<cmd>lua vim.lsp.diagnostic.show_line_diagnostics()<CR>", opts)
|
||||
buf_set_keymap("n", "[d", "<cmd>lua vim.lsp.diagnostic.goto_prev()<CR>", opts)
|
||||
buf_set_keymap("n", "]d", "<cmd>lua vim.lsp.diagnostic.goto_next()<CR>", opts)
|
||||
buf_set_keymap("n", "<space>q", "<cmd>lua vim.lsp.diagnostic.set_loclist()<CR>", opts)
|
||||
buf_set_keymap("n", "gD", "<Cmd>lua vim.lsp.buf.declaration()<CR>", opts)
|
||||
buf_set_keymap("n", "gd", "<Cmd>lua vim.lsp.buf.definition()<CR>", opts)
|
||||
buf_set_keymap("n", "K", "<Cmd>lua vim.lsp.buf.hover()<CR>", opts)
|
||||
buf_set_keymap("n", "gi", "<cmd>lua vim.lsp.buf.implementation()<CR>", opts)
|
||||
buf_set_keymap("n", "<C-k>", "<cmd>lua vim.lsp.buf.signature_help()<CR>", opts)
|
||||
buf_set_keymap("n", "<space>wa", "<cmd>lua vim.lsp.buf.add_workspace_folder()<CR>", opts)
|
||||
buf_set_keymap("n", "<space>wr", "<cmd>lua vim.lsp.buf.remove_workspace_folder()<CR>", opts)
|
||||
buf_set_keymap("n", "<space>wl", "<cmd>lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))<CR>", opts)
|
||||
buf_set_keymap("n", "<space>D", "<cmd>lua vim.lsp.buf.type_definition()<CR>", opts)
|
||||
buf_set_keymap("n", "<space>rn", "<cmd>lua vim.lsp.buf.rename()<CR>", opts)
|
||||
buf_set_keymap("n", "gr", "<cmd>lua vim.lsp.buf.references()<CR>", opts)
|
||||
buf_set_keymap("n", "<space>e", "<cmd>lua vim.lsp.diagnostic.show_line_diagnostics()<CR>", opts)
|
||||
buf_set_keymap("n", "[d", "<cmd>lua vim.lsp.diagnostic.goto_prev()<CR>", opts)
|
||||
buf_set_keymap("n", "]d", "<cmd>lua vim.lsp.diagnostic.goto_next()<CR>", opts)
|
||||
buf_set_keymap("n", "<space>q", "<cmd>lua vim.lsp.diagnostic.set_loclist()<CR>", opts)
|
||||
|
||||
-- Set some keybinds conditional on server capabilities
|
||||
if client.resolved_capabilities.document_formatting then
|
||||
buf_set_keymap("n", "<space>f", "<cmd>lua vim.lsp.buf.formatting()<CR>", opts)
|
||||
elseif client.resolved_capabilities.document_range_formatting then
|
||||
buf_set_keymap("n", "<space>f", "<cmd>lua vim.lsp.buf.range_formatting()<CR>", opts)
|
||||
end
|
||||
-- Set some keybinds conditional on server capabilities
|
||||
if client.resolved_capabilities.document_formatting then
|
||||
buf_set_keymap("n", "<space>f", "<cmd>lua vim.lsp.buf.formatting()<CR>", opts)
|
||||
elseif client.resolved_capabilities.document_range_formatting then
|
||||
buf_set_keymap("n", "<space>f", "<cmd>lua vim.lsp.buf.range_formatting()<CR>", opts)
|
||||
end
|
||||
end
|
||||
|
||||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||
capabilities.textDocument.completion.completionItem.snippetSupport = true
|
||||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||
capabilities.textDocument.completion.completionItem.snippetSupport = true
|
||||
|
||||
-- lspInstall + lspconfig stuff
|
||||
-- lspInstall + lspconfig stuff
|
||||
|
||||
local function setup_servers()
|
||||
require "lspinstall".setup()
|
||||
local servers = require "lspinstall".installed_servers()
|
||||
local function setup_servers()
|
||||
lspinstall.setup()
|
||||
local servers = lspinstall.installed_servers()
|
||||
|
||||
for _, lang in pairs(servers) do
|
||||
if lang ~= "lua" then
|
||||
lspconf[lang].setup {
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
root_dir = vim.loop.cwd
|
||||
}
|
||||
elseif lang == "lua" then
|
||||
lspconf[lang].setup {
|
||||
root_dir = vim.loop.cwd,
|
||||
settings = {
|
||||
Lua = {
|
||||
diagnostics = {
|
||||
globals = {"vim"}
|
||||
},
|
||||
workspace = {
|
||||
library = {
|
||||
[vim.fn.expand("$VIMRUNTIME/lua")] = true,
|
||||
[vim.fn.expand("$VIMRUNTIME/lua/vim/lsp")] = true
|
||||
},
|
||||
maxPreload = 100000,
|
||||
preloadFileSize = 10000
|
||||
for _, lang in pairs(servers) do
|
||||
if lang ~= "lua" then
|
||||
lspconfig[lang].setup {
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
root_dir = vim.loop.cwd
|
||||
}
|
||||
elseif lang == "lua" then
|
||||
lspconfig[lang].setup {
|
||||
root_dir = vim.loop.cwd,
|
||||
settings = {
|
||||
Lua = {
|
||||
diagnostics = {
|
||||
globals = {"vim"}
|
||||
},
|
||||
workspace = {
|
||||
library = {
|
||||
[vim.fn.expand("$VIMRUNTIME/lua")] = true,
|
||||
[vim.fn.expand("$VIMRUNTIME/lua/vim/lsp")] = true
|
||||
},
|
||||
telemetry = {
|
||||
enable = false
|
||||
}
|
||||
maxPreload = 100000,
|
||||
preloadFileSize = 10000
|
||||
},
|
||||
telemetry = {
|
||||
enable = false
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
setup_servers()
|
||||
|
||||
-- Automatically reload after `:LspInstall <server>` so we don't have to restart neovim
|
||||
require "lspinstall".post_install_hook = function()
|
||||
setup_servers() -- reload installed servers
|
||||
vim.cmd("bufdo e") -- triggers FileType autocmd that starts the server
|
||||
end
|
||||
setup_servers()
|
||||
|
||||
-- replace the default lsp diagnostic letters with prettier symbols
|
||||
vim.fn.sign_define("LspDiagnosticsSignError", {text = "", numhl = "LspDiagnosticsDefaultError"})
|
||||
vim.fn.sign_define("LspDiagnosticsSignWarning", {text = "", numhl = "LspDiagnosticsDefaultWarning"})
|
||||
vim.fn.sign_define("LspDiagnosticsSignInformation", {text = "", numhl = "LspDiagnosticsDefaultInformation"})
|
||||
vim.fn.sign_define("LspDiagnosticsSignHint", {text = "", numhl = "LspDiagnosticsDefaultHint"})
|
||||
-- Automatically reload after `:LspInstall <server>` so we don't have to restart neovim
|
||||
lspinstall.post_install_hook = function()
|
||||
setup_servers() -- reload installed servers
|
||||
vim.cmd("bufdo e") -- triggers FileType autocmd that starts the server
|
||||
end
|
||||
|
||||
return M
|
||||
-- replace the default lsp diagnostic letters with prettier symbols
|
||||
vim.fn.sign_define("LspDiagnosticsSignError", {text = "", numhl = "LspDiagnosticsDefaultError"})
|
||||
vim.fn.sign_define("LspDiagnosticsSignWarning", {text = "", numhl = "LspDiagnosticsDefaultWarning"})
|
||||
vim.fn.sign_define("LspDiagnosticsSignInformation", {text = "", numhl = "LspDiagnosticsDefaultInformation"})
|
||||
vim.fn.sign_define("LspDiagnosticsSignHint", {text = "", numhl = "LspDiagnosticsDefaultHint"})
|
||||
|
@ -0,0 +1,5 @@
|
||||
pcall(
|
||||
function()
|
||||
require("lspkind").init()
|
||||
end
|
||||
)
|
@ -0,0 +1,18 @@
|
||||
local luasnip
|
||||
if
|
||||
not pcall(
|
||||
function()
|
||||
luasnip = require "luasnip"
|
||||
end
|
||||
)
|
||||
then
|
||||
return
|
||||
end
|
||||
|
||||
luasnip.config.set_config(
|
||||
{
|
||||
history = true,
|
||||
updateevents = "TextChanged,TextChangedI"
|
||||
}
|
||||
)
|
||||
require("luasnip/loaders/from_vscode").load()
|
@ -0,0 +1,5 @@
|
||||
pcall(
|
||||
function()
|
||||
require("neoscroll").setup()
|
||||
end
|
||||
)
|
@ -1,97 +1,100 @@
|
||||
local M = {}
|
||||
|
||||
M.config = function()
|
||||
local g = vim.g
|
||||
|
||||
vim.o.termguicolors = true
|
||||
local tree_cb
|
||||
if
|
||||
not pcall(
|
||||
function()
|
||||
tree_cb = require "nvim-tree.config".nvim_tree_callback
|
||||
end
|
||||
)
|
||||
then
|
||||
return
|
||||
end
|
||||
|
||||
g.nvim_tree_side = "left"
|
||||
g.nvim_tree_width = 25
|
||||
g.nvim_tree_ignore = {".git", "node_modules", ".cache"}
|
||||
g.nvim_tree_gitignore = 1
|
||||
g.nvim_tree_auto_ignore_ft = {"dashboard"} -- don't open tree on specific fiypes.
|
||||
g.nvim_tree_auto_open = 0
|
||||
g.nvim_tree_auto_close = 0 -- closes tree when it's the last window
|
||||
g.nvim_tree_quit_on_open = 0 -- closes tree when file's opened
|
||||
g.nvim_tree_follow = 1
|
||||
g.nvim_tree_indent_markers = 1
|
||||
g.nvim_tree_hide_dotfiles = 1
|
||||
g.nvim_tree_git_hl = 1
|
||||
g.nvim_tree_highlight_opened_files = 0
|
||||
g.nvim_tree_root_folder_modifier = ":t"
|
||||
g.nvim_tree_tab_open = 0
|
||||
g.nvim_tree_allow_resize = 1
|
||||
g.nvim_tree_add_trailing = 0 -- append a trailing slash to folder names
|
||||
g.nvim_tree_disable_netrw = 1
|
||||
g.nvim_tree_hijack_netrw = 0
|
||||
g.nvim_tree_update_cwd = 1
|
||||
local g = vim.g
|
||||
|
||||
g.nvim_tree_show_icons = {
|
||||
git = 1,
|
||||
folders = 1,
|
||||
files = 1
|
||||
-- folder_arrows= 1
|
||||
}
|
||||
g.nvim_tree_icons = {
|
||||
default = "",
|
||||
symlink = "",
|
||||
git = {
|
||||
unstaged = "✗",
|
||||
staged = "✓",
|
||||
unmerged = "",
|
||||
renamed = "➜",
|
||||
untracked = "★",
|
||||
deleted = "",
|
||||
ignored = "◌"
|
||||
},
|
||||
folder = {
|
||||
-- disable indent_markers option to get arrows working or if you want both arrows and indent then just add the arrow icons in front ofthe default and opened folders below!
|
||||
-- arrow_open = "",
|
||||
-- arrow_closed = "",
|
||||
default = "",
|
||||
open = "",
|
||||
empty = "", --
|
||||
empty_open = "",
|
||||
symlink = "",
|
||||
symlink_open = ""
|
||||
}
|
||||
}
|
||||
vim.o.termguicolors = true
|
||||
|
||||
local tree_cb = require "nvim-tree.config".nvim_tree_callback
|
||||
g.nvim_tree_side = "left"
|
||||
g.nvim_tree_width = 25
|
||||
g.nvim_tree_ignore = {".git", "node_modules", ".cache"}
|
||||
g.nvim_tree_gitignore = 1
|
||||
g.nvim_tree_auto_ignore_ft = {"dashboard"} -- don't open tree on specific fiypes.
|
||||
g.nvim_tree_auto_open = 0
|
||||
g.nvim_tree_auto_close = 0 -- closes tree when it's the last window
|
||||
g.nvim_tree_quit_on_open = 0 -- closes tree when file's opened
|
||||
g.nvim_tree_follow = 1
|
||||
g.nvim_tree_indent_markers = 1
|
||||
g.nvim_tree_hide_dotfiles = 1
|
||||
g.nvim_tree_git_hl = 1
|
||||
g.nvim_tree_highlight_opened_files = 0
|
||||
g.nvim_tree_root_folder_modifier = ":t"
|
||||
g.nvim_tree_tab_open = 0
|
||||
g.nvim_tree_allow_resize = 1
|
||||
g.nvim_tree_add_trailing = 0 -- append a trailing slash to folder names
|
||||
g.nvim_tree_disable_netrw = 1
|
||||
g.nvim_tree_hijack_netrw = 0
|
||||
g.nvim_tree_update_cwd = 1
|
||||
|
||||
g.nvim_tree_bindings = {
|
||||
{key = {"<CR>", "o", "<2-LeftMouse>"}, cb = tree_cb("edit")},
|
||||
{key = {"<2-RightMouse>", "<C-}>"}, cb = tree_cb("cd")},
|
||||
{key = "<C-v>", cb = tree_cb("vsplit")},
|
||||
{key = "<C-x>", cb = tree_cb("split")},
|
||||
{key = "<C-t>", cb = tree_cb("tabnew")},
|
||||
{key = "<", cb = tree_cb("prev_sibling")},
|
||||
{key = ">", cb = tree_cb("next_sibling")},
|
||||
{key = "P", cb = tree_cb("parent_node")},
|
||||
{key = "<BS>", cb = tree_cb("close_node")},
|
||||
{key = "<S-CR>", cb = tree_cb("close_node")},
|
||||
{key = "<Tab>", cb = tree_cb("preview")},
|
||||
{key = "K", cb = tree_cb("first_sibling")},
|
||||
{key = "J", cb = tree_cb("last_sibling")},
|
||||
{key = "I", cb = tree_cb("toggle_ignored")},
|
||||
{key = "H", cb = tree_cb("toggle_dotfiles")},
|
||||
{key = "R", cb = tree_cb("refresh")},
|
||||
{key = "a", cb = tree_cb("create")},
|
||||
{key = "d", cb = tree_cb("remove")},
|
||||
{key = "r", cb = tree_cb("rename")},
|
||||
{key = "<C->", cb = tree_cb("full_rename")},
|
||||
{key = "x", cb = tree_cb("cut")},
|
||||
{key = "c", cb = tree_cb("copy")},
|
||||
{key = "p", cb = tree_cb("paste")},
|
||||
{key = "y", cb = tree_cb("copy_name")},
|
||||
{key = "Y", cb = tree_cb("copy_path")},
|
||||
{key = "gy", cb = tree_cb("copy_absolute_path")},
|
||||
{key = "[c", cb = tree_cb("prev_git_item")},
|
||||
{key = "}c", cb = tree_cb("next_git_item")},
|
||||
{key = "-", cb = tree_cb("dir_up")},
|
||||
{key = "q", cb = tree_cb("close")},
|
||||
{key = "g?", cb = tree_cb("toggle_help")}
|
||||
g.nvim_tree_show_icons = {
|
||||
git = 1,
|
||||
folders = 1,
|
||||
files = 1
|
||||
-- folder_arrows= 1
|
||||
}
|
||||
g.nvim_tree_icons = {
|
||||
default = "",
|
||||
symlink = "",
|
||||
git = {
|
||||
unstaged = "✗",
|
||||
staged = "✓",
|
||||
unmerged = "",
|
||||
renamed = "➜",
|
||||
untracked = "★",
|
||||
deleted = "",
|
||||
ignored = "◌"
|
||||
},
|
||||
folder = {
|
||||
-- disable indent_markers option to get arrows working or if you want both arrows and indent then just add the arrow icons in front ofthe default and opened folders below!
|
||||
-- arrow_open = "",
|
||||
-- arrow_closed = "",
|
||||
default = "",
|
||||
open = "",
|
||||
empty = "", --
|
||||
empty_open = "",
|
||||
symlink = "",
|
||||
symlink_open = ""
|
||||
}
|
||||
end
|
||||
}
|
||||
|
||||
return M
|
||||
g.nvim_tree_bindings = {
|
||||
{key = {"<CR>", "o", "<2-LeftMouse>"}, cb = tree_cb("edit")},
|
||||
{key = {"<2-RightMouse>", "<C-}>"}, cb = tree_cb("cd")},
|
||||
{key = "<C-v>", cb = tree_cb("vsplit")},
|
||||
{key = "<C-x>", cb = tree_cb("split")},
|
||||
{key = "<C-t>", cb = tree_cb("tabnew")},
|
||||
{key = "<", cb = tree_cb("prev_sibling")},
|
||||
{key = ">", cb = tree_cb("next_sibling")},
|
||||
{key = "P", cb = tree_cb("parent_node")},
|
||||
{key = "<BS>", cb = tree_cb("close_node")},
|
||||
{key = "<S-CR>", cb = tree_cb("close_node")},
|
||||
{key = "<Tab>", cb = tree_cb("preview")},
|
||||
{key = "K", cb = tree_cb("first_sibling")},
|
||||
{key = "J", cb = tree_cb("last_sibling")},
|
||||
{key = "I", cb = tree_cb("toggle_ignored")},
|
||||
{key = "H", cb = tree_cb("toggle_dotfiles")},
|
||||
{key = "R", cb = tree_cb("refresh")},
|
||||
{key = "a", cb = tree_cb("create")},
|
||||
{key = "d", cb = tree_cb("remove")},
|
||||
{key = "r", cb = tree_cb("rename")},
|
||||
{key = "<C->", cb = tree_cb("full_rename")},
|
||||
{key = "x", cb = tree_cb("cut")},
|
||||
{key = "c", cb = tree_cb("copy")},
|
||||
{key = "p", cb = tree_cb("paste")},
|
||||
{key = "y", cb = tree_cb("copy_name")},
|
||||
{key = "Y", cb = tree_cb("copy_path")},
|
||||
{key = "gy", cb = tree_cb("copy_absolute_path")},
|
||||
{key = "[c", cb = tree_cb("prev_git_item")},
|
||||
{key = "}c", cb = tree_cb("next_git_item")},
|
||||
{key = "-", cb = tree_cb("dir_up")},
|
||||
{key = "q", cb = tree_cb("close")},
|
||||
{key = "g?", cb = tree_cb("toggle_help")}
|
||||
}
|
||||
|
@ -1,25 +1,28 @@
|
||||
local M = {}
|
||||
|
||||
M.config = function()
|
||||
local ts_config = require("nvim-treesitter.configs")
|
||||
|
||||
ts_config.setup {
|
||||
ensure_installed = {
|
||||
"javascript",
|
||||
"html",
|
||||
"css",
|
||||
"bash",
|
||||
"lua",
|
||||
"json",
|
||||
"python"
|
||||
-- "rust",
|
||||
-- "go"
|
||||
},
|
||||
highlight = {
|
||||
enable = true,
|
||||
use_languagetree = true
|
||||
}
|
||||
}
|
||||
local ts_config
|
||||
if
|
||||
not pcall(
|
||||
function()
|
||||
ts_config = require "nvim-treesitter.configs"
|
||||
end
|
||||
)
|
||||
then
|
||||
return
|
||||
end
|
||||
|
||||
return M
|
||||
ts_config.setup {
|
||||
ensure_installed = {
|
||||
"javascript",
|
||||
"html",
|
||||
"css",
|
||||
"bash",
|
||||
"lua",
|
||||
"json",
|
||||
"python"
|
||||
-- "rust",
|
||||
-- "go"
|
||||
},
|
||||
highlight = {
|
||||
enable = true,
|
||||
use_languagetree = true
|
||||
}
|
||||
}
|
||||
|
@ -1,81 +1,63 @@
|
||||
-- plugins made by @Pocco81 =)
|
||||
|
||||
local M = {}
|
||||
|
||||
M.config = function()
|
||||
local true_zen = require("true-zen")
|
||||
local true_zen
|
||||
if
|
||||
not pcall(
|
||||
function()
|
||||
true_zen = require "true-zen"
|
||||
end
|
||||
)
|
||||
then
|
||||
return
|
||||
end
|
||||
|
||||
true_zen.setup(
|
||||
{
|
||||
misc = {
|
||||
on_off_commands = false,
|
||||
ui_elements_commands = false,
|
||||
cursor_by_mode = false,
|
||||
before_minimalist_mode_shown = true,
|
||||
before_minimalist_mode_hidden = true,
|
||||
after_minimalist_mode_shown = true,
|
||||
after_minimalist_mode_hidden = true
|
||||
},
|
||||
ui = {
|
||||
bottom = {
|
||||
laststatus = 0,
|
||||
ruler = false,
|
||||
showmode = false,
|
||||
showcmd = false,
|
||||
cmdheight = 1
|
||||
},
|
||||
top = {
|
||||
showtabline = 0
|
||||
},
|
||||
left = {
|
||||
number = false,
|
||||
relativenumber = false,
|
||||
signcolumn = "no"
|
||||
}
|
||||
true_zen.setup(
|
||||
{
|
||||
misc = {
|
||||
on_off_commands = false,
|
||||
ui_elements_commands = false,
|
||||
cursor_by_mode = false,
|
||||
before_minimalist_mode_shown = true,
|
||||
before_minimalist_mode_hidden = true,
|
||||
after_minimalist_mode_shown = true,
|
||||
after_minimalist_mode_hidden = true
|
||||
},
|
||||
ui = {
|
||||
bottom = {
|
||||
laststatus = 0,
|
||||
ruler = false,
|
||||
showmode = false,
|
||||
showcmd = false,
|
||||
cmdheight = 1
|
||||
},
|
||||
modes = {
|
||||
ataraxis = {
|
||||
left_padding = 37,
|
||||
right_padding = 37,
|
||||
top_padding = 2,
|
||||
bottom_padding = 2,
|
||||
just_do_it_for_me = false,
|
||||
ideal_writing_area_width = 0,
|
||||
keep_default_fold_fillchars = true,
|
||||
custome_bg = "#1e222a"
|
||||
},
|
||||
focus = {
|
||||
margin_of_error = 5,
|
||||
focus_method = "experimental"
|
||||
}
|
||||
top = {
|
||||
showtabline = 0
|
||||
},
|
||||
integrations = {
|
||||
galaxyline = true,
|
||||
nvim_bufferline = true
|
||||
left = {
|
||||
number = false,
|
||||
relativenumber = false,
|
||||
signcolumn = "no"
|
||||
}
|
||||
}
|
||||
)
|
||||
end
|
||||
|
||||
-- autosave.nvim plugin disabled by default
|
||||
M.autoSave = function()
|
||||
local autosave = require("autosave")
|
||||
|
||||
autosave.setup(
|
||||
{
|
||||
enabled = vim.g.auto_save, -- takes boolean value from init.lua
|
||||
execution_message = "autosaved at : " .. vim.fn.strftime("%H:%M:%S"),
|
||||
events = {"InsertLeave", "TextChanged"},
|
||||
conditions = {
|
||||
exists = true,
|
||||
filetype_is_not = {},
|
||||
modifiable = true
|
||||
},
|
||||
modes = {
|
||||
ataraxis = {
|
||||
left_padding = 37,
|
||||
right_padding = 37,
|
||||
top_padding = 2,
|
||||
bottom_padding = 2,
|
||||
just_do_it_for_me = false,
|
||||
ideal_writing_area_width = 0,
|
||||
keep_default_fold_fillchars = true,
|
||||
custome_bg = "#1e222a"
|
||||
},
|
||||
write_all_buffers = true,
|
||||
on_off_commands = true,
|
||||
clean_command_line_interval = 2500
|
||||
focus = {
|
||||
margin_of_error = 5,
|
||||
focus_method = "experimental"
|
||||
}
|
||||
},
|
||||
integrations = {
|
||||
galaxyline = true,
|
||||
nvim_bufferline = true
|
||||
}
|
||||
)
|
||||
end
|
||||
|
||||
return M
|
||||
}
|
||||
)
|
||||
|
@ -0,0 +1,21 @@
|
||||
-- colorscheme related stuff
|
||||
vim.g.nvchad_theme = "onedark"
|
||||
|
||||
local base16
|
||||
if
|
||||
not pcall(
|
||||
function()
|
||||
base16 = require "base16"
|
||||
end
|
||||
)
|
||||
then
|
||||
return false
|
||||
else
|
||||
base16(base16.themes["onedark"], true)
|
||||
local cmd = vim.cmd
|
||||
|
||||
-- load bg color before async for smooth transition
|
||||
local background = require("themes/" .. vim.g.nvchad_theme).black
|
||||
vim.cmd("hi Normal guibg=" .. background)
|
||||
return true
|
||||
end
|
Loading…
Reference in New Issue