2022-04-23 03:41:04 +02:00
|
|
|
|
-------------
|
|
|
|
|
-- General --
|
|
|
|
|
-------------
|
|
|
|
|
local set = vim.opt
|
2022-12-13 11:30:23 +01:00
|
|
|
|
local g = vim.g
|
2022-04-25 16:23:14 +02:00
|
|
|
|
set.swapfile = false -- Don't use swapfile
|
|
|
|
|
set.updatetime = 0 -- Faster completion
|
|
|
|
|
set.encoding = "utf-8" -- The encoding displayed
|
|
|
|
|
set.fileencoding = "utf-8" -- The encoding written to file
|
|
|
|
|
set.smartindent = true -- Makes indenting smart
|
|
|
|
|
set.iskeyword:append("-") -- treat dash separated words as a word text object"
|
|
|
|
|
set.clipboard = "unnamedplus" -- Copy paste between vim and everything else
|
|
|
|
|
set.smarttab = true -- Makes tabbing smarter will realize you have 2 vs 4
|
|
|
|
|
set.expandtab = true -- Converts tabs to spaces
|
|
|
|
|
set.autoindent = true -- Good auto indent
|
2022-05-03 19:28:52 +02:00
|
|
|
|
set.autochdir = false -- Your working directory will always be the same as your working directory
|
2022-04-25 16:23:14 +02:00
|
|
|
|
set.incsearch = true -- sets incremental search
|
|
|
|
|
set.shell = "/bin/zsh" -- Set your shell to bash or zsh
|
2022-08-23 14:58:15 +02:00
|
|
|
|
set.shortmess:append("sI") -- Disable nvim intro
|
|
|
|
|
vim.cmd([[set nobackup]]) -- creates a backup file
|
|
|
|
|
vim.cmd([[set nowritebackup]]) -- creates a backup file i guess
|
|
|
|
|
vim.cmd([[set formatoptions-=cro]]) -- Stop newline continution of comments
|
|
|
|
|
vim.cmd([[set complete+=kspell]]) -- auto complete with spellcheck
|
|
|
|
|
vim.cmd([[set completeopt=menuone,longest]]) -- auto complete menu (It's pretty great)
|
|
|
|
|
vim.cmd([[set nocompatible]]) -- Disable compatibility to old-time vi
|
|
|
|
|
set.mouse = "a" -- Enable mouse support
|
2022-06-20 19:57:01 +02:00
|
|
|
|
set.foldmethod = "expr"
|
|
|
|
|
set.foldexpr = "nvim_treesitter#foldexpr()" -- use treesitter for folding
|
|
|
|
|
vim.wo.foldlevel = 99 -- feel free to decrease the value
|
|
|
|
|
vim.wo.foldenable = true
|
2022-04-23 03:41:04 +02:00
|
|
|
|
|
2022-10-24 15:24:37 +02:00
|
|
|
|
vim.cmd([[set wildmode=list:longest,full]]) -- Command-line completion mode
|
|
|
|
|
vim.cmd([[let loaded_netrw = 1]]) -- Command-line completion mode
|
|
|
|
|
vim.cmd([[let loaded_netrwPlugin = 1]]) -- Command-line completion mode
|
|
|
|
|
|
2022-04-23 03:41:04 +02:00
|
|
|
|
---------------
|
|
|
|
|
-- Neovim UI --
|
|
|
|
|
---------------
|
2022-04-25 16:23:14 +02:00
|
|
|
|
set.pumheight = 15 -- Makes popup menu smaller
|
|
|
|
|
set.ruler = true -- Show the cursor position all the time
|
|
|
|
|
set.splitbelow = true -- Horizontal splits will automatically be below
|
|
|
|
|
set.splitright = true -- Vertical splits will automatically be to the right
|
|
|
|
|
set.conceallevel = 0 -- So that I can see `` in markdown files
|
2022-11-16 23:37:05 +01:00
|
|
|
|
g.markdown_fenced_languages = { "javascript", "typescript", "bash", "lua", "go", "rust", "c", "cpp" }
|
2022-04-25 16:23:14 +02:00
|
|
|
|
set.tabstop = 2 -- Insert 2 spaces for a tab
|
|
|
|
|
set.number = true -- Line numbers
|
|
|
|
|
set.background = "dark" -- tell vim what the background color looks like
|
|
|
|
|
set.virtualedit = "onemore" -- With This option you can move the cursor one character over the end
|
|
|
|
|
set.ignorecase = true -- ignores case when searching
|
|
|
|
|
set.smartcase = true -- turns on case sensitive search when letters are capitalized
|
|
|
|
|
set.termguicolors = true -- set term gui colors (most terminals support this)
|
2022-05-13 19:19:05 +02:00
|
|
|
|
set.laststatus = 3 -- Always display the status line
|
2022-04-25 16:23:14 +02:00
|
|
|
|
set.title = true -- Show current txt that you editing
|
2022-09-26 00:49:11 +02:00
|
|
|
|
set.relativenumber = true -- Vim’s absolute, relative and hybrid line numbers
|
2022-04-25 16:23:14 +02:00
|
|
|
|
set.cursorline = false -- Enable highlighting of the current line
|
2022-09-02 16:15:54 +02:00
|
|
|
|
set.synmaxcol = 128
|
|
|
|
|
vim.cmd("syntax sync minlines=256")
|
|
|
|
|
set.mousescroll = "ver:1,hor:1"
|
2022-04-25 16:23:14 +02:00
|
|
|
|
set.shiftwidth = 2 -- Change the number of space characters inserted for indentation
|
|
|
|
|
set.showtabline = 1 -- Always show tabs
|
2022-11-21 15:27:39 +01:00
|
|
|
|
set.cmdheight = 1 -- More space for displaying messages
|
2022-08-23 14:58:15 +02:00
|
|
|
|
vim.cmd([[set nowrap]]) -- Display long lines as just one line
|
|
|
|
|
vim.cmd([[set noshowmode]]) -- We don't need to see things like -- INSERT -- anymore
|
|
|
|
|
vim.cmd([[syntax enable]]) -- Enables syntax highlighing
|
|
|
|
|
vim.cmd([[set t_Co=256]]) -- Support 256 colors
|
2022-04-23 03:41:04 +02:00
|
|
|
|
-- vim.cmd "set whichwrap+=<,>,[,],h,l" -- Breaks Space-Time Continuum
|
2022-08-23 14:58:15 +02:00
|
|
|
|
vim.diagnostic.config({
|
|
|
|
|
virtual_text = false,
|
|
|
|
|
})
|
2022-04-23 03:41:04 +02:00
|
|
|
|
|
|
|
|
|
-----------------
|
|
|
|
|
-- Memory, CPU --
|
|
|
|
|
-----------------
|
2022-04-25 16:23:14 +02:00
|
|
|
|
set.hidden = true -- Required to keep multiple buffers open multiple buffers
|
|
|
|
|
set.timeoutlen = 500 -- By default timeoutlen is 1000 ms
|
2022-12-13 11:30:23 +01:00
|
|
|
|
set.lazyredraw = false -- Disable lazyredraw
|
2022-04-25 16:23:14 +02:00
|
|
|
|
set.synmaxcol = 240 -- Max column for syntax highlight
|
|
|
|
|
set.updatetime = 700 -- ms to wait for trigger an event
|