feat: add treesj plugin for structural editing and biome for typescriptreact formatting
This commit is contained in:
3 files changed
+134
-121
No files matched your search
@@ -42,6 +42,7 @@
|
|||||||
"tiny-inline-diagnostic.nvim": { "branch": "main", "commit": "f64efd33a51ea89bdb847fb3aaf716e96b83ba1a" },
|
"tiny-inline-diagnostic.nvim": { "branch": "main", "commit": "f64efd33a51ea89bdb847fb3aaf716e96b83ba1a" },
|
||||||
"todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" },
|
"todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" },
|
||||||
"toggleterm.nvim": { "branch": "main", "commit": "50ea089fc548917cc3cc16b46a8211833b9e3c7c" },
|
"toggleterm.nvim": { "branch": "main", "commit": "50ea089fc548917cc3cc16b46a8211833b9e3c7c" },
|
||||||
|
"treesj": { "branch": "main", "commit": "4770492244ccecdc9b01e0e81fa8f2f6b4a23841" },
|
||||||
"uv.nvim": { "branch": "main", "commit": "be4a7d47a976249282bb2f71fc773ac2f5325973" },
|
"uv.nvim": { "branch": "main", "commit": "be4a7d47a976249282bb2f71fc773ac2f5325973" },
|
||||||
"vim-visual-multi": { "branch": "master", "commit": "a6975e7c1ee157615bbc80fc25e4392f71c344d4" },
|
"vim-visual-multi": { "branch": "master", "commit": "a6975e7c1ee157615bbc80fc25e4392f71c344d4" },
|
||||||
"vim-wakatime": { "branch": "master", "commit": "d7973b157a632d1edeff01818f18d67e584eeaff" },
|
"vim-wakatime": { "branch": "master", "commit": "d7973b157a632d1edeff01818f18d67e584eeaff" },
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ return {
|
|||||||
['python'] = { 'ruff_fix', 'ruff_format', 'ruff_organize_imports' },
|
['python'] = { 'ruff_fix', 'ruff_format', 'ruff_organize_imports' },
|
||||||
['javascript'] = { 'biome' },
|
['javascript'] = { 'biome' },
|
||||||
['typescript'] = { 'biome' },
|
['typescript'] = { 'biome' },
|
||||||
|
['typescriptreact'] = { 'biome' },
|
||||||
['markdown'] = { 'prettier', 'markdownlint-cli2', 'markdown-toc' },
|
['markdown'] = { 'prettier', 'markdownlint-cli2', 'markdown-toc' },
|
||||||
['markdown.mdx'] = { 'prettier', 'markdownlint-cli2', 'markdown-toc' },
|
['markdown.mdx'] = { 'prettier', 'markdownlint-cli2', 'markdown-toc' },
|
||||||
['mdx'] = { 'prettier' },
|
['mdx'] = { 'prettier' },
|
||||||
|
|||||||
+132
-121
@@ -1,129 +1,140 @@
|
|||||||
return {
|
return {
|
||||||
-- treesitter
|
-- treesitter
|
||||||
{
|
{
|
||||||
"nvim-treesitter/nvim-treesitter",
|
'nvim-treesitter/nvim-treesitter',
|
||||||
build = ":TSUpdate",
|
build = ':TSUpdate',
|
||||||
event = { "BufReadPost", "BufNewFile" },
|
event = { 'BufReadPost', 'BufNewFile' },
|
||||||
config = function()
|
config = function()
|
||||||
require("nvim-treesitter").setup({
|
require('nvim-treesitter').setup({
|
||||||
ensure_installed = {
|
ensure_installed = {
|
||||||
"c",
|
'c',
|
||||||
"markdown",
|
'markdown',
|
||||||
"python",
|
'python',
|
||||||
"java",
|
'java',
|
||||||
"cpp",
|
'cpp',
|
||||||
"bash",
|
'bash',
|
||||||
"lua",
|
'lua',
|
||||||
"make",
|
'make',
|
||||||
"latex",
|
'latex',
|
||||||
"json",
|
'json',
|
||||||
"jsonc",
|
'jsonc',
|
||||||
"sql",
|
'sql',
|
||||||
"yaml",
|
'yaml',
|
||||||
"toml",
|
'toml',
|
||||||
"javascript",
|
'javascript',
|
||||||
"ts_ls",
|
'ts_ls',
|
||||||
"gitignore",
|
'gitignore',
|
||||||
"go",
|
'go',
|
||||||
"rust",
|
'rust',
|
||||||
"html",
|
'html',
|
||||||
"css",
|
'css',
|
||||||
"scss",
|
'scss',
|
||||||
"markdown_inline",
|
'markdown_inline',
|
||||||
},
|
},
|
||||||
auto_install = true,
|
auto_install = true,
|
||||||
highlight = {
|
highlight = {
|
||||||
enable = true,
|
enable = true,
|
||||||
additional_vim_regex_highlighting = true,
|
additional_vim_regex_highlighting = true,
|
||||||
},
|
},
|
||||||
indent = {
|
indent = {
|
||||||
enable = true,
|
enable = true,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
-- rendering for html, latex, md
|
-- rendering for html, latex, md
|
||||||
{
|
{
|
||||||
"OXY2DEV/markview.nvim",
|
'OXY2DEV/markview.nvim',
|
||||||
lazy = false,
|
lazy = false,
|
||||||
-- to load before treesitter
|
-- to load before treesitter
|
||||||
priority = 45,
|
priority = 45,
|
||||||
config = function()
|
config = function()
|
||||||
require("markview").setup({
|
require('markview').setup({
|
||||||
markdown = {
|
markdown = {
|
||||||
code_blocks = { sign = false },
|
code_blocks = { sign = false },
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
-- markdown preview
|
-- markdown preview
|
||||||
{
|
{
|
||||||
"iamcco/markdown-preview.nvim",
|
'iamcco/markdown-preview.nvim',
|
||||||
build = "cd app && yarn install",
|
build = 'cd app && yarn install',
|
||||||
init = function()
|
init = function()
|
||||||
vim.g.mkdp_filetypes = { "markdown" }
|
vim.g.mkdp_filetypes = { 'markdown' }
|
||||||
end,
|
end,
|
||||||
ft = "markdown",
|
ft = 'markdown',
|
||||||
cmd = { "MarkdownPreviewToggle", "MarkdownPreview" },
|
cmd = { 'MarkdownPreviewToggle', 'MarkdownPreview' },
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
"danymat/neogen",
|
'danymat/neogen',
|
||||||
dependencies = { "nvim-treesitter/nvim-treesitter" },
|
dependencies = { 'nvim-treesitter/nvim-treesitter' },
|
||||||
opts = {
|
opts = {
|
||||||
snippet_engine = "luasnip",
|
snippet_engine = 'luasnip',
|
||||||
languages = {
|
languages = {
|
||||||
python = {
|
python = {
|
||||||
template = {
|
template = {
|
||||||
annotation_convention = "google_docstrings",
|
annotation_convention = 'google_docstrings',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
-- auto pairs
|
-- auto pairs
|
||||||
{
|
{
|
||||||
"windwp/nvim-autopairs",
|
'windwp/nvim-autopairs',
|
||||||
event = "InsertEnter",
|
event = 'InsertEnter',
|
||||||
config = function()
|
config = function()
|
||||||
require("nvim-autopairs").setup()
|
require('nvim-autopairs').setup()
|
||||||
|
|
||||||
-- add new rules
|
-- add new rules
|
||||||
local pairs = require("nvim-autopairs")
|
local pairs = require('nvim-autopairs')
|
||||||
local rule = require("nvim-autopairs.rule")
|
local rule = require('nvim-autopairs.rule')
|
||||||
local cond = require("nvim-autopairs.conds")
|
local cond = require('nvim-autopairs.conds')
|
||||||
pairs.add_rules({
|
pairs.add_rules({
|
||||||
rule("$", "$", { "tex", "latex", "plaintex" })
|
rule('$', '$', { 'tex', 'latex', 'plaintex' })
|
||||||
-- do not move right when repeat character
|
-- do not move right when repeat character
|
||||||
:with_move(cond.none()),
|
:with_move(cond.none()),
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
"windwp/nvim-ts-autotag",
|
'windwp/nvim-ts-autotag',
|
||||||
ft = {
|
ft = {
|
||||||
"html",
|
'html',
|
||||||
"xml",
|
'xml',
|
||||||
"javascript",
|
'javascript',
|
||||||
"typescript",
|
'typescript',
|
||||||
"javascriptreact",
|
'javascriptreact',
|
||||||
"typescriptreact",
|
'typescriptreact',
|
||||||
"jsx",
|
'jsx',
|
||||||
"tsx",
|
'tsx',
|
||||||
"vue",
|
'vue',
|
||||||
"svelte",
|
'svelte',
|
||||||
"markdown",
|
'markdown',
|
||||||
},
|
},
|
||||||
event = "InsertEnter",
|
event = 'InsertEnter',
|
||||||
lazy = true,
|
lazy = true,
|
||||||
opts = {
|
config = function()
|
||||||
enable_close = true,
|
require('nvim-ts-autotag').setup({
|
||||||
enable_rename = true,
|
enable_close = true,
|
||||||
enable_close_on_slash = true,
|
enable_rename = true,
|
||||||
},
|
enable_close_on_slash = true,
|
||||||
},
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
'Wansmer/treesj',
|
||||||
|
keys = { '<space>m', '<space>j', '<space>s' },
|
||||||
|
dependencies = { 'nvim-treesitter/nvim-treesitter' }, -- if you install parsers with `nvim-treesitter`
|
||||||
|
config = function()
|
||||||
|
require('treesj').setup()
|
||||||
|
end,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user