Comments (10)
Everything is possible in Emacs, the question is whether anyone has the patience to write the E-Lisp to do it. Is this alignment something people in C++ are going to start to want? It may certainly become a demand for Java mode now (with Java 8) if it hasn't already. Currently Java just uses continuation indent here as D and C++ do. Mayhap just relent and use:
foreach (file; dirPath
.expandTilde()
.buildNormalizedPath()
.dirEntries(SpanMode.shallow)()
.filter!(name => name.extension == ".csv")) { // I love D :)
}
from emacs-d-mode.
I just got an answer and here
My first try didn't have any effect unfortunately. I'll try some more in Vanilla Emacs later on. Maybe you could try it out?
Correction: It works only with function calls with parens.
Update: The latest update works flawlessly in my Emacs!
from emacs-d-mode.
So I guess we add the function to the d-mode.el but leave people to use it via a d-mode-hook if they wish to?
I have prepared the ground by adding the code from the StackOverflow page in my clone of the repository. I can push the changes and the you can send in a pull request for the necessary changes to make things work?
from emacs-d-mode.
Sounds like a good plan.
Here's what I use:
https://github.com/nordlow/elisp/blob/master/mine/dotemacs.el#L1581
from emacs-d-mode.
I committed code and pushed to the mainline repository before reading the above. Apologies for that. Could I get you to do a diff of what you know works against what we now have in mainline and create a pull request?
from emacs-d-mode.
You have a typo in the comment above the function - it adds c-lineup... instead of d-lineup... function to the list.
from emacs-d-mode.
Sergei, thanks for spotting that. I had just cut and paste from the StackOverflow page, so I'll blame StackOverflow rather than me not checking things properly :-) It will be corrected momentarily.
from emacs-d-mode.
Great! Thanks!
Also, as a side note. I really think that this kind of stuff (i.e. available options and customization) should be put to the readme file and not to the source code alone. Because I doubt that a lot of people dig through the source looking for documentation.
So maybe it makes sense to move the appropriate comments from the heading of the d-mode.el file and info about this hack (and possibly other useful info) to readme to give it more publicity.
from emacs-d-mode.
Not so much a side note, more "I should have done that in the first place!" :-) I'll transfer more material onto the README.md file and/or take pull requests.
from emacs-d-mode.
I believe this issue was addressed in changesets f487a71 , 86930c3 and f4176c0 so I am closing this issue. Please re-open if there is still and issue to be addressed.
from emacs-d-mode.
Related Issues (20)
- Emacs 27.1 regression ? HOT 2
- Identifier `function` is not highlighted as keyword HOT 2
- Wrong indentation for 'else version'
- Enum members not highlighted after `deprecated`
- Wrong syntax highlight for WYSIWYG strings HOT 3
- Incorrect indentation of align(N) aggregate
- Missing fontification of member function names returning a typeof(this) HOT 2
- Wrong indentation for `catch` after `try` in brace-less `if`
- Error when missing strings and unbalanced parenthesis HOT 9
- Inconsistent `enum` highlighting (type name and members) HOT 3
- Adjust indention of attribute colon qualifier
- README.md says this software is GPLv2 which is not coherent with the COPYING file
- Escapes within backtip nested in string are ignored HOT 1
- MELPA package appears broken HOT 2
- Dead project? HOT 1
- Use cc-mode syntax parsing for imenu?
- Parenthesis-const/immutable qualified function parameters and return types HOT 4
- Cannot find function rx-form HOT 2
- wrong-type-argument error when triggering electric mode HOT 3
- Please do not bundle undercover 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-d-mode.