Comments (9)
Not something I'm seeing and definitely not expected. Could you try running :TSInstall clojure
or :TSUpdate
for me and see if that helps?
from conjure.
That's assuming you're using TreeSitter which I highly recommend. If not, what does your syntax highlighting situation look like? Do you have any?
from conjure.
Could you try running :TSInstall clojure or :TSUpdate for me and see if that helps?
Below is the ouput of running :TSUpdate .
E492: Not an editor command: TSUpdate
If not, what does your syntax highlighting situation look like? Do you have any?
I do have syntax highlight for clojure file but I am not sure what information
you are looking for.
But it reminds me one recent change I made in ~/.config/nvim/init.vim is using
nvim default colorscheme since nvim 0.10.0 comes with a new default colorscheme.
So I changed it to my original colorscheme setting as below.
# Before the change
colorscheme default
# After the change (my orignal colorscheme setting)
set termguicolors
let g:equinusocio_material_style = 'darker'
colorscheme equinusocio_material
With such change there is no such "<localleader>ee, <localleader>E evaluate the
whole file" issue .
I have no idea why such simple change can fix the issue and after that I cannot
reproduce the issue when I switch back the default colorscheme.
from conjure.
Cool so we've confirmed you're not using TreeSitter, might be worth setting it up, I think it's vastly superior to the default system in Neovim and it allows Conjure to do some more tricks for you.
My hunch is that this new Neovim scheme is tagging the words with different highlight groups that Conjure doesn't expect for some reason. In the default mode, it's looking for certain highlight groups to work out if you're inside a string or not (for example), with tree sitter we can query the tree to see what kind of nodes your cursor is in.
I'll have to reproduce this myself with this new theme and see what the issue is, will get back to you when I've got some evidence.
from conjure.
Ah Neovim 0.10 isn't out yet! I see, will get a copy of it somehow and reproduce the issue hopefully.
from conjure.
Hm, I'm using 0.10 with the new default colorscheme and tree sitter disabled but it all works fine for me 🤔 I can't reproduce the issue, maybe it's because I loaded the buffer with another scheme / tree sitter which polluted some shared mutable state. I'll try to open Neovim fresh with these settings and this version.
from conjure.
Still can't reproduce the issue on NVIM v0.10.0-dev-1938+g242261d4e
with Clojure's tree sitter module uninstalled, the theme set to default
. Everything works as expected for me,
What is the issue you're actually seeing? Because after re-reading your initial comment I don't see any problems there in your example. You're evaluating the (def example_input ...)
form which is working and returning the var. Are you saying that when you do that you'd expect to see the example_input
get defined but instead the entire file is being evaluated?
And if the entire file is evaluated then you should be seeing the result of (def b 2)
after each evaluation since it's the last form in the file.
I think I'm misunderstanding something here, I'd like to help, I just need a little more of a "what you're seeing" and "what you expect to see" I think? Thanks!
from conjure.
Cool so we've confirmed you're not using TreeSitter, might be worth setting it up, I think it's vastly superior to the default system in Neovim and it allows Conjure to do some more tricks for you.
I have a side question. Would you elaborate a bit what's additional benefit if I
use tree sitter for a Lisp dialect language?
Note: (1) IIRC last time I check out this plugin there is no tree sitter support
and it still supported clojure. (2) README only says for non Lisp languages
enabling tree sitter is required if we want to use form based evaluation
mappings(ex: <prefix>ee). But there is no mention about the additional feature
tree sitter can provide for a Lisp language.
What is the issue you're actually seeing? Because after re-reading your initial comment I don't see any problems there in your example. You're evaluating the (def example_input ...) form which is working and returning the var. Are you saying that when you do that you'd expect to see the example_input get defined but instead the entire file is being evaluated?
Yes, the entire file is being evaluated as well. If there is anything not clear
in the reproduce steps please let me know.
from conjure.
This is a good summary of the benefits of tree sitter https://thevaluable.dev/tree-sitter-neovim-overview/
For Conjure specifically you get accuracy in some cases (allowing you to evaluate things like Clojure deref, set and short function syntax correctly) AND performance on slower machines because Conjure doesn't have to hunt character to character looking for matching parenthesis. You also get features such as the comment block eval which treats (comment ...)
forms like a (do ...)
so you can evaluate comments containing developer tools easily.
And then there's the more obvious one of being able to evaluate Python / Lua etc as if it was a lisp.
I've found my syntax highlighting is far deeper and more meaningful with TS and I don't run into issues where something is highlighted incorrectly because my regex line limit is set too low.
I wouldn't be surprised if it one day completely replaced the regex engine as the default system in Neovim, only using regex as a fallback for some languages.
I'd consider it the first class highlighting / parsing system for Conjure, it's fantastic as a plugin author to have access to an AST instead of a string of characters with an archaic regex based tagging system as my only source of semantic information. I treat the regex support as a fallback these days, so still supported, but just the essentials.
I haven't attempted to reproduce your actual issue just yet, I've been staying with my family for a week or so and haven't found the time. I'll try to do it soon though! Would be great to know if anyone else has this issue too. And do you see the issue with ANY other theme, or just the new Neovim one?
from conjure.
Related Issues (20)
- stdio repl handling of both stderr and stdout for a form can be a problem sometimes HOT 1
- Problems with evaluation: wrong returns HOT 3
- Guile over nREPL, guile-ares-rs integration HOT 4
- Clojure Debugger: Evaluation failing on debug reader tags HOT 4
- Local leader key not active when open scm files HOT 7
- Common-Lisp: Only first expression is evaluated using ConjureEvalBuf HOT 19
- Feature request: Re-run last test HOT 2
- Disable ConjureOmnifunc for Janet? HOT 4
- Common Lisp/ros/swank not behaving as expected HOT 15
- No syntax highlighting in log buffer when opening file using telescope. HOT 7
- HUD not popping up when using AstroVim HOT 3
- Adapt `IRust` support HOT 5
- Hy client not showing output HOT 5
- Disable LSP and Treesitter for the log buffer by default HOT 9
- Clojure REPL in async environments does not eval output HOT 3
- Add highlighting to indicate which forms have not been changed since their last evaluation HOT 1
- Support clj-reload as well as tools.namespace reload since it's now built into nREPL
- Support lazy loading natively
- Hard resetting the log results in an error (may only be on my machine)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from conjure.