Refactor settings.lua
- Remove all options that matched the defaults in NeoVim - Remove clipboard=unnamedplus and learded to use registers :) - set some modern NeoVim settings, f.ex laststatus=3 and cmdheight=0
This commit is contained in:
parent
a097eb15be
commit
6751e7b356
|
@ -1,6 +1,5 @@
|
||||||
local o = vim.o
|
local o = vim.o
|
||||||
local g = vim.g
|
local g = vim.g
|
||||||
local cmd = vim.cmd
|
|
||||||
|
|
||||||
------ Appearance ------
|
------ Appearance ------
|
||||||
|
|
||||||
|
@ -10,59 +9,32 @@ o.termguicolors = true
|
||||||
-- Floating window transparency
|
-- Floating window transparency
|
||||||
o.winblend = 10
|
o.winblend = 10
|
||||||
|
|
||||||
-- Remove extra line
|
|
||||||
o.cmdheight = 1
|
|
||||||
|
|
||||||
-- Always show signcolumn
|
|
||||||
o.signcolumn = 'yes'
|
|
||||||
|
|
||||||
-- Diff settings
|
-- Diff settings
|
||||||
cmd 'set diffopt=filler,internal,algorithm:histogram,indent-heuristic'
|
o.diffopt = 'filler,internal,algorithm:histogram,indent-heuristic'
|
||||||
|
|
||||||
-- Allow switching buffers with unsaved changes
|
-- Allow switching buffers with unsaved changes
|
||||||
cmd 'set hidden'
|
o.hidden = true
|
||||||
|
|
||||||
-- Show line numbers
|
-- Show line numbers
|
||||||
cmd 'set number'
|
o.number = true
|
||||||
|
|
||||||
-- Blinking cursor
|
-- Blinking cursor
|
||||||
cmd 'set guicursor=i:ver1'
|
o.guicursor = 'a:blinkon1'
|
||||||
cmd 'set guicursor+=a:blinkon1'
|
|
||||||
|
|
||||||
-- Gutter and cursoline bg transparent
|
-- Enable global statusline
|
||||||
cmd 'highlight CursorLineNr guibg=transparent'
|
o.laststatus = 3
|
||||||
cmd 'highlight SignColumn guibg=transparent'
|
|
||||||
|
-- Hide cmdline
|
||||||
|
o.cmdheight = 0
|
||||||
|
|
||||||
------ Misc -------
|
------ Misc -------
|
||||||
|
|
||||||
-- Use suda by default
|
-- Use suda by default
|
||||||
g.suda_smart_edit = 1
|
g.suda_smart_edit = 1
|
||||||
|
|
||||||
-- Split direction
|
|
||||||
o.splitbelow = true
|
|
||||||
o.splitright = true
|
|
||||||
|
|
||||||
-- Case insensitive search
|
-- Case insensitive search
|
||||||
o.ignorecase = true
|
o.ignorecase = true
|
||||||
o.smartcase = true
|
o.smartcase = true
|
||||||
|
|
||||||
-- Use mouse
|
|
||||||
o.mouse = 'a'
|
|
||||||
|
|
||||||
-- Use system clipboard
|
|
||||||
o.clipboard = 'unnamedplus'
|
|
||||||
|
|
||||||
-- Autoindent and syntax higlight
|
|
||||||
o.autoindent = true
|
|
||||||
o.smartindent = true
|
|
||||||
o.tabstop = 4
|
|
||||||
o.shiftwidth = 4
|
|
||||||
cmd 'syntax on'
|
|
||||||
cmd 'filetype on'
|
|
||||||
cmd 'filetype plugin indent on'
|
|
||||||
|
|
||||||
-- Disable auto commenting
|
|
||||||
o.formatoptions = 'cro'
|
|
||||||
|
|
||||||
-- Set leader
|
-- Set leader
|
||||||
g.mapleader = " "
|
g.mapleader = " "
|
||||||
|
|
Loading…
Reference in a new issue