Config - Add options
Add a whole load of actual option set in settings.lua
This commit is contained in:
parent
1148edf3c6
commit
4e22a97f33
|
|
@ -8,4 +8,86 @@ vim.cmd([[colorscheme gruvbox]])
|
|||
|
||||
opt.ignorecase = true
|
||||
opt.smartcase = true
|
||||
opt.hlsearch = true
|
||||
opt.incsearch = true
|
||||
|
||||
opt.splitright = true
|
||||
opt.splitbelow = true
|
||||
|
||||
opt.updatetime = 1000
|
||||
|
||||
opt.scrolloff = 15
|
||||
opt.sidescroll = 6
|
||||
|
||||
opt.termguicolors = true
|
||||
|
||||
opt.title = true
|
||||
|
||||
opt.spelllang='en_gb'
|
||||
|
||||
-- Ignore compiled files
|
||||
opt.wildignore = "__pycache__"
|
||||
opt.wildignore = opt.wildignore + { "*.o", "*~", "*.pyc", "*pycache*" }
|
||||
|
||||
-- Cool floating window popup menu for completion on command line
|
||||
opt.pumblend = 17
|
||||
opt.wildmode = "longest:full"
|
||||
opt.wildoptions = "pum"
|
||||
|
||||
|
||||
-- Cursorline highlighting control
|
||||
-- Only have it on in the active buffer
|
||||
opt.cursorline = true -- Highlight the current line
|
||||
local group = vim.api.nvim_create_augroup("CursorLineControl", { clear = true })
|
||||
local set_cursorline = function(event, value, pattern)
|
||||
vim.api.nvim_create_autocmd(event, {
|
||||
group = group,
|
||||
pattern = pattern,
|
||||
callback = function()
|
||||
vim.opt_local.cursorline = value
|
||||
end,
|
||||
})
|
||||
end
|
||||
|
||||
set_cursorline("WinLeave", false)
|
||||
set_cursorline("WinEnter", true)
|
||||
set_cursorline("FileType", false, "TelescopePrompt")
|
||||
opt.showmode = false
|
||||
opt.showcmd = true
|
||||
opt.cmdheight = 1
|
||||
|
||||
|
||||
-- TABS
|
||||
opt.autoindent = true
|
||||
opt.cindent = true
|
||||
opt.wrap = true
|
||||
|
||||
opt.tabstop = 4
|
||||
opt.shiftwidth = 4
|
||||
opt.softtabstop = 4
|
||||
opt.expandtab = false
|
||||
|
||||
|
||||
opt.breakindent = true
|
||||
opt.showbreak = string.rep(" ",3)
|
||||
opt.linebreak = true
|
||||
|
||||
opt.belloff = "all" -- there is no need for the bell
|
||||
|
||||
opt.clipboard = "unnamedplus"
|
||||
|
||||
opt.mouse = "a"
|
||||
|
||||
local gr = vim.api.nvim_create_augroup("Formatting", {clear = true})
|
||||
|
||||
vim.api.nvim_create_autocmd("FileType",
|
||||
{
|
||||
group = gr,
|
||||
pattern = "*",
|
||||
callback = function ()
|
||||
vim.opt.formatoptions = vim.opt.formatoptions
|
||||
- "r"
|
||||
- "o"
|
||||
end
|
||||
})
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user