Comments (9)
from conjure.
Update to 9a3f021 to give it a try.
from conjure.
Perf should be fixed in the latest master. Also made the Deoplete source try to skip completion in comments and strings, isn't perfect but it's an improvement. You can use conjure#should_autocomplete in your plugin too if you want that extra "ready" and syntax check.
from conjure.
For future me reference: This is because the "find matching pairs to select a form" code (
Lines 47 to 113 in 9840c45
(comment ...
) block is fine since it's part of the source. I think the reader version (#_
) is fine too.
Just need to exclude parens that are inside line comments (;
), either I check if there's one on the line of the matched pair or I use the syntax highlighting. Maybe I can ask vim if the given character is within a string or comment, in which case I'll ignore it and search again.
from conjure.
Found a nice fix!
diff --git a/src/conjure/nvim.clj b/src/conjure/nvim.clj
index dd7f465..d02ca9f 100644
--- a/src/conjure/nvim.clj
+++ b/src/conjure/nvim.clj
@@ -56,9 +56,14 @@
;; backwards and forwards.
forwards (str (when root? "r") "nzW")
backwards (str "b" forwards)
+
+ ;; Ignore matches inside comments or strings.
+ ;; https://github.com/Olical/conjure/issues/34
+ skip "join(map(synstack(line('.'), col('.')), 'synIDattr(v:val, \"name\")')) =~? 'comment\\|string' ? 1 : 0"
+
get-pair (fn [s e]
- [(api/call-function :searchpairpos s "" e backwards)
- (api/call-function :searchpairpos s "" e forwards)])
+ [(api/call-function :searchpairpos s "" e backwards skip)
+ (api/call-function :searchpairpos s "" e forwards skip)])
;; Fetch the buffer, window and all matching pairs for () [] and {}.
;; We'll then select the smallest region from those three
Discovered the skip
argument in :h pairpos()
, I now provide an expression that rejects any matches found in strings or comments.
from conjure.
Fixed in v0.13.0... I think.
from conjure.
Thanks for fixing it. I just tried it and looks good :)
from conjure.
from conjure.
Thanks for the info, just updated CoC plugin
from conjure.
Related Issues (20)
- Cannot connect to Scheme through socket HOT 2
- Async/await doesn't work with ipython REPL HOT 13
- stdio repl handling of both stderr and stdout for a form can be a problem sometimes HOT 1
- <localleader>ee, <localleader>E evaluate the whole file HOT 9
- 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 1
- Adapt `IRust` support HOT 5
- Hy client not showing output HOT 5
- Disable LSP and Treesitter for the log buffer by default HOT 7
- 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
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.