summaryrefslogtreecommitdiff
path: root/lua/tjk/plugins.lua
blob: b1c857a8fc50cbd60442248cb0d358fd2ffe1aaf (plain)
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
56
57
58
59
60
vim.cmd.packadd "nvim.undotree"
vim.cmd.packadd "nvim.difftool"

-- https://github.com/m4xshen/autoclose.nvim
require("autoclose").setup {
	options = { pair_spaces = true },
}

-- TODO native cmp
-- https://github.com/Saghen/blink.cmp
require("blink-cmp").setup {
	keymap = {
		preset = "super-tab",
		["<C-k>"] = { "select_prev", "fallback" },
		["<C-j>"] = { "select_next", "fallback" },
	},
	cmdline = { enabled = false },
}

-- https://github.com/catgoose/nvim-colorizer.lua
require("colorizer").setup {
	lazy_load = true,
	options = {
		parsers = {
			css = true, -- preset: enables names, hex, rgb, hsl, oklch, css_var
			tailwind = { enable = true, update_names = true, lsp = true }, -- tailwind + lsp context
			xterm = { enable = true }, -- xterm 256-color codes (#xNN, \e[38;5;NNNm)
			xcolor = { enable = true }, -- LaTeX xcolor expressions (e.g. red!30)
		},
	},
}

-- https://git.tjkeller.xyz/minitab.nvim
require("minitab").setup()

-- https://github.com/nvim-treesitter/nvim-treesitter
-- TODO "geigerzaehler/tree-sitter-jinja2", -- adds filetype for htmljinja, not recognized by ts by default. Requires gcc in path
require("nvim-treesitter.configs").setup {
	highlight = { enable = true, disable = { "yaml", "dockerfile" } },
	indent = { enable = true, disable = { "yaml" } },
}

-- https://github.com/windwp/nvim-ts-autotag
require("nvim-ts-autotag").setup {
	per_filetype = { ["html"] = { enable_close = true } },
}

-- https://github.com/HiPhish/rainbow-delimiters.nvim
--require("rainbow-delimiters.setup").setup()

-- https://github.com/folke/snacks.nvim
require("snacks").setup {
	indent = {
		enabled = true,
		only_scope = true,
		animate = { enabled = false },
		scope = { enabled = false },
	},
	quickfile = { enabled = true },
}