Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
jmbuhr committed Dec 2, 2023
1 parent 5a78371 commit cbda5fb
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions lua/plugins/quarto.lua
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ return {
branch = "master",
run = ":TSUpdate",
config = function()
local function disable_ts(lang, bufnr) -- Disable in large buffers
local large_file = vim.api.nvim_buf_line_count(bufnr) > 50000
return large_file
end

require("nvim-treesitter.configs").setup({
ensure_installed = {
"r",
Expand All @@ -65,19 +70,22 @@ return {
},
highlight = {
enable = true,
disable = disable_ts,
additional_vim_regex_highlighting = false,
-- optional (with quarto-vim extension and pandoc-syntax)
-- additional_vim_regex_highlighting = { 'markdown' },
-- additional_vim_regex_highlighting = { 'quarto', 'markdown' },

-- note: the vim regex based highlighting from
-- quarto-vim / vim-pandoc sets the wrong comment character
-- for some sections where there is `$` math.
},
indent = {
enable = true,
disable = disable_ts,
},
incremental_selection = {
enable = true,
disable = disable_ts,
keymaps = {
init_selection = "gnn",
node_incremental = "grn",
Expand All @@ -88,6 +96,7 @@ return {
textobjects = {
select = {
enable = true,
disable = disable_ts,
lookahead = true,
keymaps = {
-- You can use the capture groups defined in textobjects.scm
Expand All @@ -99,6 +108,7 @@ return {
},
move = {
enable = true,
disable = disable_ts,
set_jumps = true, -- whether to set jumps in the jumplist
goto_next_start = {
["]m"] = "@function.outer",
Expand Down Expand Up @@ -477,13 +487,13 @@ return {
flags = lsp_flags
}

lspconfig.rust_analyzer.setup{
lspconfig.rust_analyzer.setup {
on_attach = on_attach,
capabilities = capabilities,
settings = {
['rust-analyzer'] = {
diagnostics = {
enable = false;
enable = false,
}
}
}
Expand Down

0 comments on commit cbda5fb

Please sign in to comment.