separated plugins configs and added couple new plugins

This commit is contained in:
Jeremie Fraeys 2023-11-22 01:25:43 -05:00
parent 8c93e97b86
commit 6b3424c590
11 changed files with 201 additions and 115 deletions

View file

@ -1,15 +1,13 @@
local opt = vim.opt
local g = vim.g
local opts = {
-- change cursor in insert mode
-- Change cursor in insert mode
guicursor = "",
-- Make line numbers default
relativenumber = true,
-- Enable mouse mode
mouse = 'a',
-- Enable break indent
breakindent = true,
@ -18,16 +16,15 @@ local opts = {
softtabstop = 4,
shiftwidth = 4,
expandtab = true,
smartindent = true,
-- Disable line wrap
wrap = false,
-- Save undo history_list
-- Save undo history
swapfile = false,
backup = false,
undodir = os.getenv("HOME") .. "/.vim/undodir",
undodir = vim.fn.stdpath("data") .. "/site/undodir",
undofile = true,
-- Searching Configuration
@ -48,14 +45,12 @@ local opts = {
-- NOTE: You should make sure your terminal supports this
termguicolors = true,
scrolloff = 10,
-- isfname:append("@-@"),
colorcolumn = "80",
-- part of the neovim imprioving command below
pyxversion = 3
pyxversion = 3,
}
for k, v in pairs(opts) do
vim.opt[k] = v
opt[k] = v
end
local win_local = {
@ -67,7 +62,7 @@ for k, v in pairs(win_local) do
vim.wo[k] = v
end
-- disable builtins plugins
-- Disable built-in plugins
local disabled_built_ins = {
"2html_plugin",
"getscript",
@ -75,12 +70,12 @@ local disabled_built_ins = {
"gzip",
"logipat",
"matchit",
-- "netrw",
-- "netrw",
"netrwFileHandlers",
"loaded_remote_plugins",
"loaded_tutor_mode_plugin",
"netrwPlugin",
"netrwSettings",
-- "netrwPlugin",
-- "netrwSettings",
"rrhelper",
"spellfile_plugin",
"tar",
@ -89,31 +84,27 @@ local disabled_built_ins = {
"vimballPlugin",
"zip",
"zipPlugin",
"matchparen", -- matchparen.nvim disables the default
"matchparen",
}
for _, plugin in pairs(disabled_built_ins) do
vim.g["loaded_" .. plugin] = 1
g["loaded_" .. plugin] = 1
end
--
-- IMPROVE NEOVIM STARTUP
-- https://github.com/editorconfig/editorconfig-vim/issues/50
-- Improve Neovim startup
local global_let_opts = {
loaded_python_provier = 0,
loaded_python_provider = 0,
loaded_python3_provider = 0,
python_host_skip_check = 1,
-- python_host_prog = '/bin/python2',
python3_host_skip_check = 1,
python3_host_prog = '/usr/local/bin/python3',
EditorConfig_core_mode = 'external_command',
-- https://vi.stackexchange.com/a/5318/7339
matchparen_timeout = 20,
matchparen_insert_timeout = 20,
}
for k, v in pairs(global_let_opts) do
vim.g[k] = v
g[k] = v
end
opt.formatoptions = "l"
@ -126,12 +117,3 @@ opt.formatoptions = opt.formatoptions
+ "n" -- Indent past the formatlistpat, not underneath it.
+ "j" -- Auto-remove comments if possible.
- "2" -- I'm not in gradeschool anymore
opt.guicursor = {
"n-v:block",
"i-c-ci-ve:ver25",
"r-cr:hor20",
"o:hor50",
"i:blinkwait700-blinkoff400-blinkon250-Cursor/lCursor",
"sm:block-blinkwait175-blinkoff150-blinkon175",
}