65 lines
		
	
	
		
			1.6 KiB
		
	
	
	
		
			Lua
		
	
	
	
	
	
			
		
		
	
	
			65 lines
		
	
	
		
			1.6 KiB
		
	
	
	
		
			Lua
		
	
	
	
	
	
| vim.g.mapleader = " "
 | |
| vim.keymap.set({ "n", "v" }, "<Space>", "<Nop>", { silent = true })
 | |
| 
 | |
| -- disable netrw
 | |
| vim.g.loaded_netrw = 1
 | |
| vim.g.loaded_netrwPlugin = 1
 | |
| 
 | |
| -- general
 | |
| vim.o.backup = false
 | |
| vim.o.mouse = ""
 | |
| -- TODO:(janezicmatej) i think mouse scroll is binded to up/down and this
 | |
| -- deosn't always work
 | |
| vim.o.mousescroll = "ver:0,hor:0"
 | |
| vim.o.writebackup = false
 | |
| vim.o.undofile = true
 | |
| 
 | |
| -- ui
 | |
| vim.o.breakindent = true
 | |
| vim.o.colorcolumn = "+1"
 | |
| vim.o.number = true
 | |
| vim.o.cursorline = true
 | |
| vim.o.relativenumber = true
 | |
| vim.o.splitright = true
 | |
| vim.o.splitbelow = true
 | |
| vim.o.signcolumn = "yes"
 | |
| vim.o.wrap = false
 | |
| vim.o.winborder = "double"
 | |
| 
 | |
| -- editing
 | |
| vim.o.autoindent = true
 | |
| vim.o.expandtab = true
 | |
| vim.o.ignorecase = true
 | |
| vim.o.smartcase = true
 | |
| 
 | |
| -- diagnostic show virtual text
 | |
| vim.diagnostic.config({ virtual_text = true })
 | |
| 
 | |
| -- osc52 escape codes copy
 | |
| local function ocs52_paste_fail()
 | |
|     vim.notify("can't paste via osc52", vim.log.levels.WARN)
 | |
|     return {}
 | |
| end
 | |
| vim.g.clipboard = {
 | |
|     name = "osc52-writeonly",
 | |
|     copy = {
 | |
|         ["+"] = require("vim.ui.clipboard.osc52").copy("+"),
 | |
|         ["*"] = require("vim.ui.clipboard.osc52").copy("*"),
 | |
|     },
 | |
|     paste = {
 | |
|         ["+"] = ocs52_paste_fail,
 | |
|         ["*"] = ocs52_paste_fail,
 | |
|     },
 | |
| }
 | |
| 
 | |
| vim.o.completeopt = "menuone,noselect,fuzzy,nosort"
 | |
| 
 | |
| -- default plus added dash
 | |
| vim.o.iskeyword = "@,48-57,_,192-255,-"
 | |
| 
 | |
| vim.api.nvim_create_autocmd("TextYankPost", {
 | |
|     desc = "highlight when yanking text",
 | |
|     group = vim.api.nvim_create_augroup("CustomHighlightYank", { clear = true }),
 | |
|     callback = function() vim.highlight.on_yank() end,
 | |
| })
 |