DEVELOPMENT ENVIRONMENT

~alex/dotfiles

ref: f87d1a8e4efae1000910971e60a08518549f46cb dotfiles/nvim/lua/options.lua -rw-r--r-- 1.3 KiB
f87d1a8e — Alejandro Laguna feat: init dotfiles 16 days ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
vim.opt.termguicolors = true
vim.opt.colorcolumn = "100"
vim.opt.number = true
vim.opt.relativenumber = true
vim.opt.mouse = "a"
vim.opt.showmode = false
vim.opt.guicursor = "n-v-i-c:block-Cursor"
vim.opt.signcolumn = "yes"
vim.opt.cursorline = true
vim.opt.scrolloff = 10

vim.api.nvim_set_hl(0, "Comment", { italic = true })

vim.schedule(function()
	vim.opt.clipboard = "unnamedplus"
end)

vim.opt.breakindent = true
vim.opt.undofile = true
vim.opt.ignorecase = true
vim.opt.smartcase = true
vim.opt.updatetime = 250
vim.opt.timeoutlen = 300

vim.opt.splitright = true
vim.opt.splitbelow = true

vim.opt.list = true
vim.opt.listchars = { tab = "» ", trail = "·", nbsp = "␣" }
vim.opt.inccommand = "split"

vim.opt.tabstop = 4
vim.opt.shiftwidth = 4
vim.opt.expandtab = true

vim.diagnostic.config({
	signs = true,
	virtual_text = true,
	update_in_insert = false,
	severity_sort = true,
})

vim.opt.conceallevel = 1

-- Failsafe: Completely block treesitter from starting on markdown
-- This prevents crashes in Neovim 0.12+ hovers/files
local original_ts_start = vim.treesitter.start
vim.treesitter.start = function(bufnr, lang)
	local buf = bufnr or vim.api.nvim_get_current_buf()
	local ft = lang or vim.bo[buf].filetype
	if ft == "markdown" or ft == "markdown_inline" then
		return false
	end
	return original_ts_start(bufnr, lang)
end