Open andy941 opened 2 weeks ago
Thanks for reporting the bug! I will see this later.
Interestingly, cc does not work, but cd does.
I can't replicate the bug. Everything works as expected on my side.
Maybe you could disable some plugins to see if they interfere with R.nvim
. I have headlines.nvim
installed, but I don't get the R and Python symbols at the right top of code blocks.
Maybe you could disable some plugins to see if they interfere with
R.nvim
. I haveheadlines.nvim
installed, but I don't get the R and Python symbols at the right top of code blocks.
This is a different plugin called markview.nvim, it's IMHO even better looking and more plug and play. But you are right, when I get the chance I'll test with a minimal config. Do you already have one ready?
You can find examples of minimal config at https://github.com/R-nvim/R.nvim/blob/main/README.md and https://github.com/R-nvim/R.nvim/wiki/Configuration
I replaced headlines.nvim
with markview.nvim
and I agree that it looks better. Thanks!
By the way, I still can't replicate the bug.
Noted. I will let you know if the minimal config works later this week.
I can confirm I have the same issue with the minimal config you provided (nvim --clean -u minimal.lua example.qmd
).
Same problems as above when \cc
and \cN
.
Example.qmd
---
format:
html:
useMath: true
standalone: true
embed-resources: true
self-contained: true
self-contained-math: true
# pdf:
# documentclass: article
# toc: false
# number-sections: true
# colorlinks: true
# #cite-method: biblatex
# header-includes:
# - |
# ```{=latex}
# \usepackage{fvextra}
# \DefineVerbatimEnvironment{Highlighting}{Verbatim}{
# breaksymbolleft={},
# showspaces = false,
# showtabs = false,
# breaklines,
# commandchars=\\\{\}
# }
# ```
# gfm:
# output-file: "README"
# output-ext: "md"
# fig-dpi: 300
title: ""
author: "Andrea Finocchio"
#bibliography: cite.bib
citeproc: true
link-citations: true
code-fold: true
fig-dpi: 300
engine: knitr
highlight-style: gruvbox
cache: false
code-overflow: wrap
---
```{r}
#| lst-label: lst-imports-and-functions-r
#| lst-cap: lst-imports-and-functions-r
#| code-summary: "Imports and Functions - R"
#| output: false
#| code-fold: true
library(tidyverse)
library(reticulate)
library(ggthemes)
library(ggpubr)
library(kableExtra)
#library(EnvStats)
@lst-imports-and-functions-r
#| label: imports-and-functions-python
#| code-summary: "Imports and Functions - Python"
#| output: false
import pysam
import pandas as pd
import matplotlib.pyplot as plt
import os
import json
from IPython.core.display import Markdown
from tabulate import tabulate
#import pybedtools
I can't replicate the bug with the same command, nvim --clean -u minimal.lua example.qmd
, where minimal.lua
is the minimal config from the wiki and example.qmd
is the code you posted. I'm using Neovim v0.11.0-dev-1032+g230b0c7f02 (compiled yesterday) on Debian Testing (Linux).
Could you delete the nvim-treesitter
directory to force the regeneration of all parsers?
Since I can't replicate the bug, we have to wait until someone can fix it and make a pull request.
I have tried regenerating all parsers but that did not solve the issues (with minimal.lua
config as well). This is even more minimalistic example if that helps:
---
title: ""
---
```{r}
#| label: imports-and-functions-r
library(tidyverse)
#| label: imports-and-functions-r
library(tidyverse)
#| label: imports-and-functions-python
import pandas as pd
starting from the top: `\gn` twice to get to the first line of the second block `#| label: imports-and-functions-r`, then try to get back one block with `\gN`, nothing happens. If you get to the code line in the same block, `\gN` goes back one block as expected. Also `\cc` does not work in code blocks when on any comment line with the error: `Not inside an T code chunk`.
Sorry I can be of more help, @PMassicotte seem to have similar issues as me?
> Interestingly, cc does not work, but cd does.
I will check that on my side when I am back to the office on Monday.
This works fine on my side.
This here my code file
---
format:
html:
useMath: true
standalone: true
embed-resources: true
self-contained: true
self-contained-math: true
# pdf:
# documentclass: article
# toc: false
# number-sections: true
# colorlinks: true
# #cite-method: biblatex
# header-includes:
# - |
# ```{=latex}
# \usepackage{fvextra}
# \DefineVerbatimEnvironment{Highlighting}{Verbatim}{
# breaksymbolleft={},
# showspaces = false,
# showtabs = false,
# breaklines,
# commandchars=\\\{\}
# }
# ```
# gfm:
# output-file: "README"
# output-ext: "md"
# fig-dpi: 300
title: ""
author: "Andrea Finocchio"
#bibliography: cite.bib
citeproc: true
link-citations: true
code-fold: true
fig-dpi: 300
engine: knitr
highlight-style: gruvbox
cache: false
code-overflow: wrap
---
```{r}
#| lst-label: lst-imports-and-functions-r
#| lst-cap: lst-imports-and-functions-r
#| code-summary: "Imports and Functions - R"
#| output: false
#| code-fold: true
library(tidyverse)
library(reticulate)
library(ggthemes)
library(ggpubr)
library(kableExtra)
# library(EnvStats)
# | label: imports-and-functions-python
# | code-summary: "Imports and Functions - Python"
# | output: false
import pysam
import pandas as pd
import matplotlib.pyplot as plt
import os
import json
from IPython.core.display import Markdown
from tabulate import tabulate
# import pybedtools
With me using send lines:
When the cursor is in a comment in a code chunk (Quarto) some keybindings do not work:
RSendChunk
fails withNot inside an R code chunk
RPreviousRChunk
does nothing. Weirdly enough, if there are more than one comment line in the chunk it does nothing if I am on the first comment line, if I am in any other comment line it will bring me to the first one.Both commands work perfectly well in the non-comment lines in the chunk for both Python and R chunks.
One other thing to note is that instead
RNextRChunk
works in comment lines too which makes it all even more confusing.TO be clear this affects all the times when the cursor is in any comment line not only
|#
.Could it be a bug?