See how most identifiers are considered as type_variable now.
I also observed similar issue (i.e. some part of the code turned to type_variable) on different configuration, but that's difficult to extract.
For example, this piece of code:
-- |
-- Solve a model for (a subset of) the given time steps.
--
-- The solving ends either when we reach the end of the given time steps, or
-- when the solving triggers an event that stops the ODE solver.
solveBetweenTwoEvents
:: forall m . (Katip m)
=> OdeLlvmCaches
-> InlinedModel DiffModel
-> SolverOpts
-> ModelOverlay -- ^ Initial transformation to apply to the model
-> [NDouble] -- ^ Time steps to solve for
-> m SolverResult
solveBetweenTwoEvents caches mdl solver_opts overlay desired_timesteps = do
let
localModel = updateMdlInitCond mdl (overlayInitialConditions overlay)
allow_events_at_t0 = overlayIsFirstChunk overlay
localRawResults0 :: SolverResult <- integrateModel caches localModel allow_events_at_t0 solver_opts (VS.fromList desired_timesteps)
return $ if
-- leave the very first chunk as is
| overlayIsFirstChunk overlay -> localRawResults0
-- when solving is stopped by an event, keep the first row in case it is
-- the only row, see https://git.novadiscovery.net/jinko/jinko/-/merge_requests/3609
| solverStop localRawResults0 -> localRawResults0
-- if the chunk is not the very first chunk, we remove the first row of the
-- result because it is a duplicate of the last row of the previous result.
| Varying ts <- resVals (solverTimes localRawResults0), VS.length ts > 1 -> dropFirstTime localRawResults0
| otherwise -> error "The impossible happened, SolverResult only has zero or one time step" -- should not happen
Remove the $ after the return, and suddently, a lot of the code (and other functions) are turned to type variables (orange colouring here):
I'm unsure which additional information I can provide. This is my neovim version:
Here is the feedback of my neovim checkhealth, at least the part related to tree-sitter:
nvim-treesitter: require("nvim-treesitter.health").check()
Installation ~
- OK `tree-sitter` found 0.20.8 (parser generator, only needed for :TSInstallFromGrammar)
- OK `node` found v18.17.1 (only needed for :TSInstallFromGrammar)
- OK `git` executable found.
- OK `gcc` executable found. Selected from { "gcc", "cc", "gcc", "clang", "cl", "zig" }
Version: gcc (GCC) 12.3.0
- OK Neovim was compiled with tree-sitter runtime ABI version 14 (required >=13). Parsers must be compatible with runtime ABI.
OS Info:
{
machine = "x86_64",
release = "6.5.4",
sysname = "Linux",
version = "#1-NixOS SMP PREEMPT_DYNAMIC Tue Sep 19 10:30:30 UTC 2023"
} ~
Parser/Features H L F I J
- bash x ✓ ✓ . x
- c ✓ ✓ ✓ ✓ ✓
- haskell ✓ . ✓ . ✓
- javascript ✓ ✓ ✓ ✓ ✓
- lua ✓ ✓ ✓ ✓ ✓
- markdown ✓ . ✓ ✓ ✓
- markdown_inline ✓ . . . ✓
- pyf ✓ . . . ✓
- python ✓ ✓ ✓ ✓ ✓
- query ✓ ✓ ✓ ✓ ✓
- typescript ✓ ✓ ✓ ✓ ✓
- vim ✓ ✓ ✓ . ✓
- vimdoc ✓ . . . ✓
- vue ✓ . ✓ ✓ ✓
Legend: H[ighlight], L[ocals], F[olds], I[ndents], In[j]ections
+) multiple parsers found, only one will be used
x) errors found in the query, try to run :TSUpdate {lang} ~
The following errors have been detected: ~
- ERROR bash(highlights): ...-1094d0c/share/nvim/runtime/lua/vim/treesitter/query.lua:248: Query error at 37:3. Invalid node type "":
"<&-"
^
bash(highlights) is concatenated from the following files:
| [ERROR]:"/home/guillaume/.vim/plugged/nvim-treesitter/queries/bash/highlights.scm", failed to load: ...-1094d0c/share/nvim/runtime/lua/vim/treesitter/query.lua:248: Query error at 37:3. Invalid node type "":
"<&-"
^
- ERROR bash(injections): ...-1094d0c/share/nvim/runtime/lua/vim/treesitter/query.lua:248: Query error at 9:4. Invalid node type "heredoc_end":
(heredoc_end) @injection.language)
^
bash(injections) is concatenated from the following files:
| [ERROR]:"/home/guillaume/.vim/plugged/nvim-treesitter/queries/bash/injections.scm", failed to load: ...-1094d0c/share/nvim/runtime/lua/vim/treesitter/query.lua:248: Query error at 9:4. Invalid node type "heredoc_end":
(heredoc_end) @injection.language)
I actually don't know how to check which version of the haskell rules is packaged with this neovim version.
Some items are seen as
type variable
when they are not, depending on some weird combination of indentation, extension, ...For example, the folliwing:
Gives me the following tree (observed in neovim using
InspectTree
:However, the following:
(see the subtle difference in indentation of the
-> Int
gives me:See how most identifiers are considered as
type_variable
now.I also observed similar issue (i.e. some part of the code turned to
type_variable
) on different configuration, but that's difficult to extract.For example, this piece of code:
Remove the
$
after thereturn
, and suddently, a lot of the code (and other functions) are turned to type variables (orange colouring here):I'm unsure which additional information I can provide. This is my neovim version:
Here is the feedback of my neovim checkhealth, at least the part related to tree-sitter:
I actually don't know how to check which version of the haskell rules is packaged with this neovim version.