diff options
author | aktersnurra <grydholm@kth.se> | 2021-04-19 21:43:23 +0200 |
---|---|---|
committer | aktersnurra <grydholm@kth.se> | 2021-04-19 21:43:23 +0200 |
commit | 23b895222a16925d39d04d45dedbedec9db0c752 (patch) | |
tree | eb5759eed884c1ddcb32f1b702e55dc4521bf60e /.config/nvim/lua/settings.lua | |
parent | 174cd547dc32bb6d50ab5da329ad1bc4d516c20a (diff) |
Updates to nvim
Diffstat (limited to '.config/nvim/lua/settings.lua')
-rw-r--r-- | .config/nvim/lua/settings.lua | 82 |
1 files changed, 36 insertions, 46 deletions
diff --git a/.config/nvim/lua/settings.lua b/.config/nvim/lua/settings.lua index e75bb02..4f06694 100644 --- a/.config/nvim/lua/settings.lua +++ b/.config/nvim/lua/settings.lua @@ -1,47 +1,37 @@ -vim.cmd('set iskeyword+=-') --treat dash separated words as a word text object" -vim.cmd('set shortmess+=c') --Don't pass messages to |ins-completion-menu|. -vim.o.hidden=true --Required to keep multiple buffers open multiple buffers -vim.wo.wrap=false --Display long lines as just one line -vim.cmd('set whichwrap+=<,>,[,],h,l') -vim.o.encoding="utf-8" --The encoding displayed -vim.o.pumheight=10 --Makes popup menu smaller -vim.o.fileencoding="utf-8" --The encoding written to file -vim.o.ruler=true -- " Show the cursor position all the time -vim.o.cmdheight=2 --More space for displaying messages -vim.o.mouse="a" --Enable your mouse -vim.o.splitbelow=true --Horizontal splits will automatically be below -vim.o.termguicolors=true -vim.o.splitright=true --Vertical splits will automatically be to the right -vim.o.t_Co="256" --Support 256 colors -vim.o.conceallevel=0 --So that I can see `` in markdown files -vim.o.tabstop=2 --Insert 2 spaces for a tab -vim.o.shiftwidth=2 --Change the number of space characters inserted for indentation -vim.o.smarttab=true --Makes tabbing smarter will realize you have 2 vs 4 -vim.o.expandtab=true --Converts tabs to spaces -vim.o.smartindent=true --Makes indenting smart -vim.o.autoindent=true --Good auto indent -vim.o.laststatus=2 --Always display the status line -vim.wo.number = true -vim.o.cursorline=true --Enable highlighting of the current line -vim.o.background="dark" --tell vim what the background color looks like -vim.o.showtabline=2 --Always show tabs -vim.o.showmode=false --We don't need to see things like -- INSERT -- anymore -vim.o.backup=false --This is recommended by coc -vim.o.writebackup=false --This is recommended by coc -vim.wo.signcolumn="yes" --Always show the signcolumn, otherwise it would shift the text each time -vim.o.updatetime=300 --Faster completion -vim.o.timeoutlen=100 --By default timeoutlen is 1000 ms -vim.o.clipboard="unnamedplus" --Copy paste between vim and everything else -vim.o.incsearch=true +vim.cmd('set iskeyword+=-') -- treat dash separated words as a word text object" +vim.cmd('set shortmess+=c') -- Don't pass messages to |ins-completion-menu|. +vim.cmd('set inccommand=split') -- Make substitution work in realtime +vim.o.hidden = O.hidden_files -- Required to keep multiple buffers open multiple buffers +vim.o.title = true +TERMINAL = vim.fn.expand('$TERMINAL') +vim.cmd('let &titleold="'..TERMINAL..'"') +vim.o.titlestring="%<%F%=%l/%L - nvim" +vim.wo.wrap = O.wrap_lines -- Display long lines as just one line +vim.cmd('set whichwrap+=<,>,[,],h,l') -- move to next line with theses keys +vim.cmd('syntax on') -- move to next line with theses keys +vim.o.pumheight = 10 -- Makes popup menu smaller +vim.o.fileencoding = "utf-8" -- The encoding written to file +vim.o.cmdheight = 2 -- More space for displaying messages +vim.cmd('set colorcolumn=99999') -- fix indentline for now +vim.o.mouse = "a" -- Enable your mouse +vim.o.splitbelow = true -- Horizontal splits will automatically be below +vim.o.termguicolors = true -- set term giu colors most terminals support this +vim.o.splitright = true -- Vertical splits will automatically be to the right +vim.o.t_Co = "256" -- Support 256 colors +vim.o.conceallevel = 0 -- So that I can see `` in markdown files +vim.cmd('set ts=4') -- Insert 2 spaces for a tab +vim.cmd('set sw=4') -- Change the number of space characters inserted for indentation +vim.bo.expandtab = true -- Converts tabs to spaces +vim.bo.smartindent = true -- Makes indenting smart +vim.wo.number = O.number -- set numbered lines +vim.wo.relativenumber = O.relative_number -- set relative number +vim.wo.cursorline = true -- Enable highlighting of the current line +vim.o.showtabline = 2 -- Always show tabs +vim.o.showmode = false -- We don't need to see things like -- INSERT -- anymore +vim.o.backup = false -- This is recommended by coc +vim.o.writebackup = false -- This is recommended by coc +vim.wo.signcolumn = "yes" -- Always show the signcolumn, otherwise it would shift the text each time +vim.o.updatetime = 300 -- Faster completion +vim.o.timeoutlen = 100 -- By default timeoutlen is 1000 ms +vim.o.clipboard = "unnamedplus" -- Copy paste between vim and everything else vim.o.guifont="SpaceMono\\ Nerd\\ Font\\ Mono:h18" - --- relative line numbers --- vim.cmd('set number relativenumber') ---[[ local u = require('utils') - -u.define_augroups({ - numbertoggle = { - {'BufEnter', 'FocusGained', 'InsertLeave * set relativenumber'}, - {'BufLeave', 'FocusLost', 'InsertEnter * set norelativenumber'}, - }, -}) ]] |