forked from dineshsalunke/nvim-config
refactor: minor cleanup
This commit is contained in:
parent
50cf0ee012
commit
b3ab8777ca
@ -1,71 +1,85 @@
|
|||||||
-- This file is automatically loaded by plugins.config
|
|
||||||
vim.g.mapleader = " "
|
|
||||||
vim.g.maplocalleader = " "
|
|
||||||
|
|
||||||
vim.g.loaded_netrwPlugin = 1
|
|
||||||
vim.g.loaded_netrw = 1
|
|
||||||
|
|
||||||
vim.g.loaded_python_provider = 0
|
|
||||||
vim.g.loaded_python3_provider = 0
|
|
||||||
vim.g.loaded_ruby_provider = 0
|
|
||||||
vim.g.loaded_perl_provider = 0
|
|
||||||
|
|
||||||
local opt = vim.opt
|
local opt = vim.opt
|
||||||
|
local g = vim.g
|
||||||
|
|
||||||
|
-------------------------------------- globals -----------------------------------------
|
||||||
|
g.transparency = true
|
||||||
|
g.mapleader = " "
|
||||||
|
-------------------------------------- options -----------------------------------------
|
||||||
|
opt.laststatus = 3
|
||||||
|
opt.showmode = false
|
||||||
|
|
||||||
|
opt.clipboard = "unnamedplus"
|
||||||
|
opt.cursorline = true
|
||||||
|
|
||||||
|
-- Indenting
|
||||||
|
opt.expandtab = true
|
||||||
|
opt.shiftwidth = 4
|
||||||
|
opt.smartindent = true
|
||||||
|
opt.tabstop = 4
|
||||||
|
opt.softtabstop = 4
|
||||||
|
opt.shiftround = true -- Round indent
|
||||||
|
|
||||||
|
opt.fillchars = { eob = " " }
|
||||||
|
opt.ignorecase = true
|
||||||
|
opt.smartcase = true
|
||||||
|
opt.mouse = "a"
|
||||||
|
|
||||||
|
-- Numbers
|
||||||
|
opt.number = true
|
||||||
|
opt.numberwidth = 4
|
||||||
|
opt.relativenumber = true -- Relative line numbers
|
||||||
|
opt.ruler = false
|
||||||
|
|
||||||
|
-- disble vim intro
|
||||||
|
opt.shortmess:append("sI")
|
||||||
|
|
||||||
|
opt.signcolumn = "yes"
|
||||||
|
opt.splitbelow = true
|
||||||
|
opt.splitright = true
|
||||||
|
opt.termguicolors = true
|
||||||
|
opt.timeoutlen = 400
|
||||||
|
opt.undofile = true
|
||||||
|
|
||||||
|
opt.updatetime = 250
|
||||||
|
|
||||||
|
-- go to previous/next line with h,l,left arrow and right arrow
|
||||||
|
-- when cursor reaches end/beginning of line
|
||||||
|
opt.whichwrap:append("<>[]hl")
|
||||||
|
|
||||||
|
-- disable some default providers
|
||||||
|
for _, provider in ipairs({ "node", "perl", "python3", "ruby" }) do
|
||||||
|
g["loaded_" .. provider .. "_provider"] = 0
|
||||||
|
end
|
||||||
|
|
||||||
|
-- This file is automatically loaded by plugins.config
|
||||||
|
|
||||||
|
vim.g.loaded_netrwPlugin = 3
|
||||||
|
vim.g.loaded_netrw = 3
|
||||||
|
|
||||||
opt.hlsearch = false
|
opt.hlsearch = false
|
||||||
opt.incsearch = true
|
opt.incsearch = true
|
||||||
opt.autowrite = true -- Enable auto write
|
|
||||||
opt.clipboard = "unnamedplus" -- Sync with system clipboard
|
|
||||||
opt.completeopt = "menu,menuone,noselect"
|
opt.completeopt = "menu,menuone,noselect"
|
||||||
opt.conceallevel = 3 -- Hide * markup for bold and italic
|
|
||||||
opt.confirm = true -- Confirm to save changes before exiting modified buffer
|
|
||||||
opt.cursorline = true -- Enable highlighting of the current line
|
|
||||||
opt.expandtab = true -- Use spaces instead of tabs
|
|
||||||
opt.formatoptions = "jcroqlnt" -- tcqj
|
opt.formatoptions = "jcroqlnt" -- tcqj
|
||||||
opt.grepformat = "%f:%l:%c:%m"
|
opt.grepformat = "%f:%l:%c:%m"
|
||||||
opt.grepprg = "rg --vimgrep"
|
opt.grepprg = "rg --vimgrep"
|
||||||
opt.ignorecase = true -- Ignore case
|
|
||||||
opt.inccommand = "nosplit" -- preview incremental substitute
|
opt.inccommand = "nosplit" -- preview incremental substitute
|
||||||
opt.laststatus = 0
|
|
||||||
opt.list = true -- Show some invisible characters (tabs...
|
opt.list = true -- Show some invisible characters (tabs...
|
||||||
opt.mouse = "a" -- Enable mouse mode
|
|
||||||
opt.number = true -- Print line number
|
opt.pumblend = 12 -- Popup blend
|
||||||
opt.pumblend = 10 -- Popup blend
|
opt.pumheight = 12 -- Maximum number of entries in a popup
|
||||||
opt.pumheight = 10 -- Maximum number of entries in a popup
|
opt.scrolloff = 8 -- Lines of context
|
||||||
opt.relativenumber = true -- Relative line numbers
|
|
||||||
opt.scrolloff = 4 -- Lines of context
|
|
||||||
opt.sessionoptions = { "buffers", "curdir", "tabpages", "winsize" }
|
opt.sessionoptions = { "buffers", "curdir", "tabpages", "winsize" }
|
||||||
opt.shiftround = true -- Round indent
|
|
||||||
opt.shiftwidth = 4 -- Size of an indent
|
|
||||||
opt.shortmess:append({ W = true, I = true, c = true })
|
|
||||||
opt.showmode = false -- Dont show mode since we have a statusline
|
|
||||||
opt.sidescrolloff = 8 -- Columns of context
|
opt.sidescrolloff = 8 -- Columns of context
|
||||||
opt.signcolumn = "yes" -- Always show the signcolumn, otherwise it would shift the text each time
|
|
||||||
opt.smartcase = true -- Don't ignore case with capitals
|
|
||||||
opt.smartindent = true -- Insert indents automatically
|
|
||||||
opt.spelllang = { "en" }
|
opt.spelllang = { "en" }
|
||||||
opt.splitbelow = true -- Put new windows below current
|
|
||||||
opt.splitright = true -- Put new windows right of current
|
|
||||||
opt.tabstop = 4 -- Number of spaces tabs count for
|
|
||||||
opt.termguicolors = true -- True color support
|
|
||||||
opt.timeoutlen = 300
|
|
||||||
opt.undolevels = 10000
|
|
||||||
opt.updatetime = 50 -- Save swap file and trigger CursorHold
|
|
||||||
opt.wildmode = "longest:full,full" -- Command-line completion mode
|
opt.wildmode = "longest:full,full" -- Command-line completion mode
|
||||||
opt.winminwidth = 5 -- Minimum window width
|
opt.winminwidth = 7 -- Minimum window width
|
||||||
opt.wrap = false -- Disable line wrap
|
opt.wrap = false -- Disable line wrap
|
||||||
|
|
||||||
-- opt.colorcolumn = "80"
|
-- opt.colorcolumn = "82"
|
||||||
|
|
||||||
opt.swapfile = false
|
opt.swapfile = false
|
||||||
opt.undofile = true
|
opt.undofile = true
|
||||||
opt.backup = false
|
opt.backup = false
|
||||||
opt.undodir = os.getenv("HOME") .. "/.vim/undodir"
|
opt.undodir = os.getenv("HOME") .. "/.vim/undodir"
|
||||||
|
|
||||||
if vim.fn.has("nvim-0.9.0") == 1 then
|
|
||||||
opt.splitkeep = "screen"
|
|
||||||
opt.shortmess:append({ C = true })
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Fix markdown indentation settings
|
|
||||||
vim.g.markdown_recommended_style = 0
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user