more updates
This commit is contained in:
parent
5d15c857fa
commit
b951216ef4
43
.config/nvim/ftplugin/markdown.lua
Normal file
43
.config/nvim/ftplugin/markdown.lua
Normal file
@ -0,0 +1,43 @@
|
||||
vim.opt.wrap = true;
|
||||
vim.opt.textwidth = 80;
|
||||
|
||||
vim.api.nvim_buf_set_keymap(0, "n", "j", "gj", { noremap = true, silent = true })
|
||||
vim.api.nvim_buf_set_keymap(0, "n", "k", "gk", { noremap = true, silent = true })
|
||||
|
||||
--Disable header folding
|
||||
vim.g.vim_markdown_folding_disabled = 1
|
||||
|
||||
--Disable math tex conceal and syntax highlight
|
||||
vim.g.tex_conceal = ''
|
||||
vim.g.vim_markdown_math = 0
|
||||
|
||||
--Support front matter of various format
|
||||
vim.g.vim_markdown_frontmatter = 1 --for YAML format
|
||||
-- vim.g.vim_markdown_toml_frontmatter = 1 --for TOML format
|
||||
-- vim.g.vim_markdown_json_frontmatter = 1 --for JSON format
|
||||
|
||||
--Let the TOC window autofit so that it doesn't take too much space
|
||||
vim.g.vim_markdown_toc_autofit = 1
|
||||
vim.g.vim_markdown_fenced_languages = {'python', 'javascript', 'lua', 'bash=sh', 'html', 'css', 'typescript', 'jsx', 'tsx', 'ts', 'js'}
|
||||
|
||||
-- Add asterisks in block comments
|
||||
vim.opt.formatoptions:append { 'r' }
|
||||
vim.g.vim_markdown_override_syntax = 1
|
||||
|
||||
-- don't conceal code fences
|
||||
vim.cmd([[
|
||||
let g:pandoc#syntax#conceal#use = 0
|
||||
let g:pandoc#syntax#codeblocks#embeds#langs#prefix = "```"
|
||||
let g:pandoc#syntax#codeblocks#embeds#langs#suffix = "```"
|
||||
]])
|
||||
|
||||
vim.cmd([[autocmd FileType markdown setlocal syntax=pandoc]])
|
||||
|
||||
vim.cmd([[
|
||||
augroup markdown
|
||||
autocmd!
|
||||
autocmd FileType markdown setlocal wrap
|
||||
autocmd FileType markdown setlocal textwidth=80
|
||||
autocmd FileType markdown setlocal formatoptions+=a
|
||||
augroup END
|
||||
]])
|
||||
@ -4,17 +4,13 @@ return {
|
||||
enabled = true,
|
||||
lazy = false,
|
||||
config = function()
|
||||
local opts = { noremap = true, silent = true }
|
||||
local ng = require("ng");
|
||||
vim.keymap.set("n", "<leader>at", function()
|
||||
ng.goto_template_for_component({ reuse_window = true })
|
||||
end, opts)
|
||||
end, { desc = "Go to template" })
|
||||
vim.keymap.set("n", "<leader>ac", function()
|
||||
ng.goto_component_with_template_file({ reuse_window = true })
|
||||
end, opts)
|
||||
vim.keymap.set("n", "<leader>aT", function()
|
||||
ng.get_template_tcb({ reuse_window = true })
|
||||
end, opts)
|
||||
end, { desc = "Go to component" })
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
||||
@ -69,6 +69,8 @@ return {
|
||||
{ "<leader>t", group = "todo" },
|
||||
{ "<leader>N", group = "noice" },
|
||||
{ "<leader>f", group = "files" },
|
||||
{ "<leader>a", group = "angular" },
|
||||
{ "<leader>T", group = "term" },
|
||||
})
|
||||
|
||||
-- Z = { "<cmd>ZenMode<cr>", "Zen" },
|
||||
|
||||
Loading…
Reference in New Issue
Block a user