Comments (7)
Cool, I didn't spot it, I'll do the PR then.
It seems doable even for a elisp newbie like me :D
(especially because those multiline comments are like the java's one)
from emacs-scala-mode.
Since hs-minor-mode
is part of emacs
proper, you can add support for it in emacs-scala-mode
.
Just do a PR that adds the needed configuration.
As I understand it, the only thing you need to do is to add the required regular expressions for comment start and end to the hs-special-modes-alist
list (https://www.emacswiki.org/emacs/HideShow).
from emacs-scala-mode.
I tried with this code
(push (purecopy '(scala-mode "{" "}" "/[*/]" nil nil)) (cdr (last hs-special-modes-alist)))
as for c-mode
and java-mode
and if you place the cursor on a multi-line comment executing hs-hide-block
it works, hiding the comment properly
BUT 😄 if you put the cursor at the beginning of a class and execute the hs-hide-level
the comments are not hid as for the content of defs.
Someone has any idea why this is happening?
I attach a gif so you can see by yourself
from emacs-scala-mode.
And you are sure that is not what is supposed to happen?
from emacs-scala-mode.
Personally I expected to see that collapsed as a normal block, but I don't know how HideShow works internally.
from emacs-scala-mode.
Can you open some Java code and see what happens.
from emacs-scala-mode.
I checked copying a java file from a random github java repo. Seems It behaves the same way. Then, I suppose it's right.
I'll rise a PR if you can suggest me where to put the extra line. As I said I'm a noob of elisp and modes :D
And maybe I'll just create a custom elisp function for collapsing all comments into the current block into my config ;)
from emacs-scala-mode.
Related Issues (20)
- move to gitlab HOT 1
- import symbol at point using CTAGS HOT 4
- face colourings incorrect for scalaz right disjunction
- git CI back online
- How do I run scala code blocks in org-mode? HOT 11
- Incompatible with aggressive-indent-mode HOT 12
- Fontification of prettified symbols HOT 1
- Remove ob-scala.el since it depends on abandoned ensime HOT 5
- Tag a new release HOT 2
- Support Scala 3/Dotty HOT 48
- Don't understand rationale behind syntax hightlighting. HOT 2
- Inappropriate Indentation for classes with keyword names HOT 2
- Learning Emacs link in the README file is broken HOT 1
- imenu fails with error HOT 3
- Allow to customize parameter list indentation level? HOT 1
- Highlighting stopped working entirely in new Emacs versions HOT 3
- Please consider tag a new release.
- Inserting a space char causes error HOT 1
- Navigate function or class definition WRT start and end HOT 2
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 emacs-scala-mode.