local M = {} function M.lua_source() require('nvim-treesitter.configs').setup { highlight = { enable = true, -- syntax highlightを有効にする disable = { -- デフォルトの方が見やすい場合は無効に } }, indent = { enable = true }, matchup = { -- enable = true, -- mandatory, false will disable the whole extension -- disable = { "c", "ruby" }, -- optional, list of language that will be disabled }, -- ensure_installed = 'all', -- :TSInstall allと同じ ensure_installed = { "awk", "bash", "css", "csv", "diff", "dockerfile", "git_config", "git_rebase", "gitattributes", "gitcommit", "gitignore", "html", "ini", "java", "javascript", "jq", "json", "lua", "make", "markdown", "markdown_inline", "passwd", "php", "php_only", "phpdoc", "ruby", "scss", "sql", "ssh_config", "toml", "tsx", "typescript", "vim", "vimdoc", "vue", "xml", }, } -- nvim-ts-context-commentstring require('ts_context_commentstring').setup { enable_autocmd = false, } -- FIXME: 全部書かずに、追加分だけ書く事はできないのか? require("vim.treesitter.query").set( "markdown", "highlights", [[ ;From nvim-treesitter/nvim-treesitter (atx_heading (inline) @text.title) (setext_heading (paragraph) @text.title) [ (atx_h1_marker) (atx_h2_marker) (atx_h3_marker) (atx_h4_marker) (atx_h5_marker) (atx_h6_marker) (setext_h1_underline) (setext_h2_underline) ] @punctuation.special [ (link_title) (indented_code_block) (fenced_code_block) ] @text.literal [ (fenced_code_block_delimiter) ] @punctuation.delimiter (code_fence_content) @none [ (link_destination) ] @text.uri [ (link_label) ] @text.reference [ (list_marker_plus) (list_marker_minus) (list_marker_star) (list_marker_dot) (list_marker_parenthesis) (thematic_break) ] @punctuation.special [ (block_continuation) (block_quote_marker) ] @punctuation.special [ (backslash_escape) ] @string.escape ; 引用はコメントと同じ色に (block_quote) @comment ]] ) end return M