2022-03-03 13:52:43 -05:00
|
|
|
-- General Neovim settings and configuration
|
|
|
|
|
-----------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
-----------------------------------------------------------
|
|
|
|
|
-- Neovim API aliases
|
|
|
|
|
-----------------------------------------------------------
|
|
|
|
|
local fn = vim.fn -- Call Vim functions
|
|
|
|
|
local cmd = vim.cmd -- Execute Vim commands
|
|
|
|
|
local exec = vim.api.nvim_exec -- Execute Vimscript
|
|
|
|
|
local g = vim.g -- Global variables
|
|
|
|
|
local opt = vim.opt -- Set options (global/buffer/windows-scoped)
|
|
|
|
|
|
|
|
|
|
-----------------------------------------------------------
|
|
|
|
|
-- General
|
|
|
|
|
-----------------------------------------------------------
|
|
|
|
|
g.mapleader = ',' -- Change leader to a comma
|
|
|
|
|
opt.mouse = 'a' -- Enable mouse support
|
|
|
|
|
opt.clipboard = 'unnamedplus' -- Copy/paste to system clipboard
|
|
|
|
|
opt.swapfile = false -- Don't use swapfile
|
|
|
|
|
opt.shadafile = "NONE"
|
|
|
|
|
opt.shadafile = ""
|
2022-07-07 16:45:13 -04:00
|
|
|
opt.shell = "/bin/zsh"
|
2022-03-03 13:52:43 -05:00
|
|
|
opt.updatetime = 200
|
|
|
|
|
opt.cursorline = true
|
2022-07-07 16:45:13 -04:00
|
|
|
g.markdown_folding = 1
|
2022-11-30 17:21:29 -05:00
|
|
|
opt.spell=true
|
|
|
|
|
opt.spelllang = 'en_us'
|
2022-03-03 13:52:43 -05:00
|
|
|
-----------------------------------------------------------
|
|
|
|
|
-- Neovim UI
|
|
|
|
|
-----------------------------------------------------------
|
|
|
|
|
opt.number = true -- Show line number
|
2022-11-28 19:55:20 -05:00
|
|
|
opt.relativenumber = true -- Show Current Line with Relative numbers above and below cursor.
|
2022-11-16 17:11:48 -05:00
|
|
|
opt.showmatch = true -- Highlight matching parenthesis
|
|
|
|
|
opt.foldmethod = 'syntax' -- Enable folding (default 'foldmarker')
|
2022-11-30 17:21:29 -05:00
|
|
|
opt.colorcolumn = '150' -- Line length marker at 80 columns
|
2022-03-03 13:52:43 -05:00
|
|
|
opt.splitright = true -- Vertical split to the right
|
2022-11-30 17:21:29 -05:00
|
|
|
opt.splitbelow = true -- Horizontal split to the bottom
|
2022-03-03 13:52:43 -05:00
|
|
|
opt.ignorecase = true -- Ignore case letters when search
|
|
|
|
|
opt.smartcase = true -- Ignore lowercase for the whole pattern
|
|
|
|
|
opt.linebreak = true -- Wrap on word boundary
|
2022-11-16 17:11:48 -05:00
|
|
|
opt.signcolumn = 'yes:2' -- Signs column always on, minimum 2.
|
2022-03-03 13:52:43 -05:00
|
|
|
|
|
|
|
|
-----------------------------------------------------------
|
|
|
|
|
-- Memory, CPU
|
|
|
|
|
-----------------------------------------------------------
|
|
|
|
|
opt.hidden = true -- Enable background buffers
|
|
|
|
|
opt.history = 100 -- Remember N lines in history
|
|
|
|
|
opt.lazyredraw = true -- Faster scrolling
|
|
|
|
|
opt.synmaxcol = 240 -- Max column for syntax highlight
|
|
|
|
|
|
|
|
|
|
-----------------------------------------------------------
|
|
|
|
|
-- Colorscheme
|
|
|
|
|
-----------------------------------------------------------
|
2022-11-16 17:11:48 -05:00
|
|
|
opt.termguicolors = true -- Enable 24-bit RGB colors
|
|
|
|
|
cmd [[colorscheme catppuccin-macchiato]]
|
2022-03-03 13:52:43 -05:00
|
|
|
-----------------------------------------------------------
|
|
|
|
|
-- Tabs, indent
|
|
|
|
|
-----------------------------------------------------------
|
|
|
|
|
opt.expandtab = true -- Use spaces instead of tabs
|
|
|
|
|
opt.shiftwidth = 4 -- Shift 4 spaces when tab
|
|
|
|
|
opt.tabstop = 4 -- 1 tab == 4 spaces
|
|
|
|
|
opt.smartindent = true -- Autoindent new lines
|
2022-07-07 16:45:13 -04:00
|
|
|
-----------------------------------------------------------
|
|
|
|
|
-- Glow Settings
|
|
|
|
|
-----------------------------------------------------------
|
|
|
|
|
g.glow_binary_path = '/bin'
|
|
|
|
|
g.glow_border = 'rounded'
|
|
|
|
|
g.glow_width = 120
|
|
|
|
|
g.glow_use_pager = true
|
|
|
|
|
g.glow_style = 'dark'
|
|
|
|
|
-----------------------------------------------------------
|
|
|
|
|
-- MKDX Settings, mkdx#settings.
|
|
|
|
|
-----------------------------------------------------------
|
2022-03-03 13:52:43 -05:00
|
|
|
-- 2 spaces for selected filetypes
|
|
|
|
|
cmd [[
|
2022-07-07 16:45:13 -04:00
|
|
|
autocmd FileType md,liquid,xml,html,xhtml,css,scss,javascript,lua,yaml setlocal shiftwidth=2 tabstop=2
|
2022-03-03 13:52:43 -05:00
|
|
|
]]
|
|
|
|
|
|
|
|
|
|
local disabled_built_ins = {
|
|
|
|
|
"netrw",
|
|
|
|
|
"netrwPlugin",
|
|
|
|
|
"netrwSettings",
|
|
|
|
|
"netrwFileHandlers",
|
|
|
|
|
"gzip",
|
|
|
|
|
"zip",
|
|
|
|
|
"zipPlugin",
|
|
|
|
|
"tar",
|
|
|
|
|
"tarPlugin",
|
|
|
|
|
"getscript",
|
|
|
|
|
"getscriptPlugin",
|
|
|
|
|
"vimball",
|
|
|
|
|
"vimballPlugin",
|
|
|
|
|
"2html_plugin",
|
|
|
|
|
"logipat",
|
|
|
|
|
"rrhelper",
|
|
|
|
|
"spellfile_plugin",
|
|
|
|
|
"matchit"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
for _, plugin in pairs(disabled_built_ins) do
|
|
|
|
|
vim.g["loaded_" .. plugin] = 1
|
|
|
|
|
end
|