LunarVim/lua/settings.lua

48 lines
2.7 KiB
Lua
Raw Normal View History

2021-03-23 06:12:50 +01:00
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
2021-04-01 10:33:02 +02:00
vim.o.hidden = O.hidden_files -- Required to keep multiple buffers open multiple buffers
2021-04-04 23:21:57 +02:00
vim.o.title = true
2021-04-13 01:50:04 +02:00
TERMINAL = vim.fn.expand('$TERMINAL')
vim.cmd('let &titleold="'..TERMINAL..'"')
2021-04-04 23:21:57 +02:00
vim.o.titlestring="%<%F%=%l/%L - nvim"
2021-04-01 10:33:02 +02:00
vim.wo.wrap = O.wrap_lines -- Display long lines as just one line
2021-03-23 17:49:02 +01:00
vim.cmd('set whichwrap+=<,>,[,],h,l') -- move to next line with theses keys
vim.cmd('syntax on') -- syntax highlighting
2021-03-23 06:12:50 +01:00
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
2021-03-25 07:36:57 +01:00
vim.cmd('set colorcolumn=99999') -- fix indentline for now
2021-03-23 06:12:50 +01:00
vim.o.mouse = "a" -- Enable your mouse
vim.o.splitbelow = true -- Horizontal splits will automatically be below
vim.o.termguicolors = true -- set term gui colors most terminals support this
2021-03-23 06:12:50 +01:00
vim.o.splitright = true -- Vertical splits will automatically be to the right
-- vim.o.t_Co = "256" -- Support 256 colors
2021-03-23 06:12:50 +01:00
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.cmd('set expandtab') -- Converts tabs to spaces
2021-03-23 06:12:50 +01:00
vim.bo.smartindent = true -- Makes indenting smart
2021-04-01 10:33:02 +02:00
vim.wo.number = O.number -- set numbered lines
vim.wo.relativenumber = O.relative_number -- set relative number
vim.wo.cursorline = O.cursorline -- set highlighting of the current line
2021-03-23 06:12:50 +01:00
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
2021-06-26 20:21:49 +02:00
vim.o.swapfile = false -- Do not write any swp files
vim.o.undodir = CACHE_PATH .. '/undo' -- Set undo directory
vim.o.undofile = true -- Enable persistent undo
2021-03-23 06:12:50 +01:00
vim.wo.signcolumn = "yes" -- Always show the signcolumn, otherwise it would shift the text each time
vim.o.updatetime = 300 -- Faster completion
2021-05-06 08:23:33 +02:00
vim.o.timeoutlen = O.timeoutlen -- By default timeoutlen is 1000 ms
2021-03-23 06:12:50 +01:00
vim.o.clipboard = "unnamedplus" -- Copy paste between vim and everything else
vim.g.nvim_tree_disable_netrw = O.nvim_tree_disable_netrw -- enable netrw for remote gx gf support (must be set before plugin's packadd)
vim.cmd('filetype plugin on') -- filetype detection
2021-04-07 06:29:10 +02:00
-- vim.o.guifont = "JetBrainsMono\\ Nerd\\ Font\\ Mono:h18"
-- vim.o.guifont = "Hack\\ Nerd\\ Font\\ Mono"
-- vim.o.guifont = "SauceCodePro Nerd Font:h17"
vim.o.guifont = "FiraCode Nerd Font:h17"
-- vim.o.guifont = "JetBrains\\ Mono\\ Regular\\ Nerd\\ Font\\ Complete"