Updated Yazi: version, hop plugin, glow preview
This commit is contained in:
20
nvim/lua/plugins/prettier.lua
Normal file
20
nvim/lua/plugins/prettier.lua
Normal file
@@ -0,0 +1,20 @@
|
||||
local null_ls = require("null-ls")
|
||||
|
||||
null_ls.setup({
|
||||
debug = false, -- set to true if you want log spam
|
||||
sources = {
|
||||
null_ls.builtins.formatting.prettier.with({
|
||||
filetypes = { "markdown", "markdown.pandoc", "pandoc" },
|
||||
}),
|
||||
},
|
||||
on_attach = function(client, bufnr)
|
||||
if client.supports_method("textDocument/formatting") then
|
||||
vim.api.nvim_create_autocmd("BufWritePre", {
|
||||
buffer = bufnr,
|
||||
callback = function()
|
||||
vim.lsp.buf.format({ bufnr = bufnr })
|
||||
end,
|
||||
})
|
||||
end
|
||||
end,
|
||||
})
|
||||
@@ -1,15 +1,22 @@
|
||||
require'nvim-treesitter.configs'.setup {
|
||||
ensure_installed = { "c", "lua", "python", "javascript", "markdown", "html", "css"}, -- Add languages you use
|
||||
sync_install = false, -- Install parsers asynchronously
|
||||
auto_install = true, -- Automatically install missing parsers
|
||||
ensure_installed = { "c", "lua", "python", "javascript", "markdown", "markdown_inline", "html", "css" },
|
||||
sync_install = false,
|
||||
auto_install = true,
|
||||
|
||||
highlight = {
|
||||
enable = true, -- Enable syntax highlighting
|
||||
additional_vim_regex_highlighting = false, -- Avoid slow fallback regex highlighting
|
||||
enable = true,
|
||||
disable = function(lang, buf)
|
||||
local filename = vim.api.nvim_buf_get_name(buf)
|
||||
if lang == "latex" or filename:match("%.bib$") then
|
||||
return true
|
||||
end
|
||||
return false
|
||||
end,
|
||||
},
|
||||
|
||||
indent = {
|
||||
enable = true -- Enable indentation support
|
||||
enable = true,
|
||||
disable = { "tex", "bib", "markdown" }
|
||||
},
|
||||
|
||||
incremental_selection = {
|
||||
@@ -23,3 +30,7 @@ require'nvim-treesitter.configs'.setup {
|
||||
},
|
||||
}
|
||||
|
||||
vim.opt.foldmethod = "expr"
|
||||
vim.opt.foldexpr = "nvim_treesitter#foldexpr()"
|
||||
vim.opt.foldlevel = 2
|
||||
vim.opt.foldenable = true
|
||||
|
||||
@@ -8,6 +8,8 @@ vim.g.vimtex_view_skim_activate = 1 -- Activate Skim on compilation
|
||||
vim.g.vimtex_compiler_method = 'latexmk' -- Use latexmk for LaTeX compilation
|
||||
vim.g.vimtex_quickfix_mode = 0 -- Disable automatic quickfix window
|
||||
vim.g.vimtex_syntax_enabled = 1 -- Enable VimTeX syntax highlighting
|
||||
vim.g.vimtex_fold_enabled = 1 -- Enable VimTeX syntax highlighting
|
||||
vim.g.vimtex_format_enabled = 1 -- Enable VimTeX syntax highlighting
|
||||
|
||||
-- Custom TeX Engine Commands
|
||||
vim.api.nvim_create_user_command(
|
||||
|
||||
Reference in New Issue
Block a user