File: test.lua

package info (click to toggle)
vim-vimtex 2.17-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 8,844 kB
  • sloc: makefile: 360; python: 103
file content (31 lines) | stat: -rw-r--r-- 862 bytes parent folder | download
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
vim.opt.runtimepath:prepend "~/.local/plugged/vimtex"
vim.opt.runtimepath:append "~/.local/plugged/vimtex/after"
-- vim.opt.runtimepath:prepend "."
vim.opt.runtimepath:append "./after"

vim.cmd [[filetype plugin indent on]]
vim.cmd [[syntax enable]]

vim.keymap.set("n", "q", "<cmd>qall!<cr>")

vim.g.vimtex_cache_root = "."
vim.g.vimtex_cache_persistent = false

vim.cmd.colorscheme "morning"

vim.api.nvim_set_hl(0, "Conceal", { bg = "NONE", fg = "blue" })
vim.api.nvim_set_hl(0, "texCmdRef", { fg = "cyan" })

local au_group = vim.api.nvim_create_augroup("init", {})
vim.api.nvim_create_autocmd("CursorMoved", {
  pattern = "*",
  group = au_group,
  command = [[echo join(vimtex#syntax#stack(), ' -> ')]],
})
vim.api.nvim_create_autocmd("FileType", {
  pattern = "markdown",
  group = au_group,
  command = [[call vimtex#init()]],
})

vim.cmd.edit "test.md"