aboutsummaryrefslogblamecommitdiff
path: root/.config/nvim/lua/general.lua
blob: 28b4980dcd69a4cc84ae4ccc5fc8fcfe46ba3489 (plain) (tree)
1
2
3
4
5
6
7
8
9
10









                             
                              
 













                                                                                          
 




                                                               
 
                               
                                             
 
                     



                                   




                  
                     
             
                   








                                                                                         
vim.opt.mouse = "a"
vim.opt.number = true
vim.opt.relativenumber = true
vim.opt.termguicolors = true
vim.opt.wrap = false
vim.opt.visualbell = true
vim.opt.undofile = true
vim.opt.backupcopy = "yes"
vim.opt.undolevels = 1000
vim.opt.wrap = false
vim.opt.colorcolumn = "80,120"

-- vim.opt.tabstop = 4
-- vim.opt.softtabstop = -1
-- vim.opt.shiftwidth = 4
-- vim.opt.expandtab = true
-- vim.opt.autoindent = true

vim.cmd [[autocmd FileType typescript setlocal shiftwidth=2 softtabstop=2 expandtab]]
vim.cmd [[autocmd FileType typescriptreact setlocal shiftwidth=2 softtabstop=2 expandtab]]
vim.cmd [[autocmd FileType css setlocal shiftwidth=2 softtabstop=2 expandtab]]
vim.cmd [[autocmd FileType html setlocal shiftwidth=2 softtabstop=2 expandtab]]
vim.cmd [[autocmd FileType json setlocal shiftwidth=2 softtabstop=2 expandtab]]
vim.cmd [[autocmd FileType cs setlocal shiftwidth=4 softtabstop=4 expandtab]]

vim.cmd [[filetype indent off]]

-- Comment the following lines to disable whitespace characters
vim.opt.list = true
vim.opt.listchars:append("space:⋅")
vim.opt.listchars:append("eol:↴")
vim.opt.listchars:append("tab:-->")

vim.cmd [[colorscheme dracula]]
vim.cmd [[hi Normal guibg=NONE ctermbg=NONE]]

vim.opt.spell = false
vim.opt.spelllang = "en"

vim.g.markdown_fenced_languages = {
	"ts=typescript";
	"xml";
	"mermaid";
	"yaml";
	"sql";
	"sh";
	"console=sh";
	"cs";
	"ini=toml";
}

if vim.fn.has("wsl") == 1 then
	vim.api.nvim_create_autocmd("TextYankPost", {
		group = vim.api.nvim_create_augroup("Yank", { clear = true });
		callback = function() vim.fn.system("clip.exe", vim.fn.getreg("\"")) end;
	})
end