This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-01-29
Channels
- # aatree (1)
- # admin-announcements (7)
- # announcements (3)
- # beginners (125)
- # boot (164)
- # braid-chat (8)
- # cider (26)
- # cljsrn (37)
- # clojars (3)
- # clojure (162)
- # clojure-argentina (1)
- # clojure-art (2)
- # clojure-berlin (5)
- # clojure-czech (3)
- # clojure-ireland (1)
- # clojure-miami (1)
- # clojure-norway (9)
- # clojure-russia (47)
- # clojurebridge (1)
- # clojurescript (151)
- # community-development (1)
- # conf-proposals (80)
- # core-async (15)
- # core-matrix (1)
- # cursive (66)
- # datomic (26)
- # emacs (17)
- # events (10)
- # funcool (59)
- # hoplon (43)
- # incanter (2)
- # jobs (10)
- # ldnclj (8)
- # lein-figwheel (18)
- # luminus (1)
- # off-topic (19)
- # om (144)
- # onyx (167)
- # overtone (9)
- # parinfer (12)
- # pedestal (1)
- # proton (158)
- # re-frame (139)
- # reagent (48)
- # test-check (19)
- # testing (43)
@austincrft: merged 🎉
@geksilla: it would be great if we could build automatic path discovery into proton (somehow)
@dvcrn yes, I will try to use service provided by environment
package. Will see if we can reset process.env.PATH
one idea would be to force-deactivate all packages, let proton do it’s thing and then proton re-loads all of them. another one would be to continue what we do already but reload all packages after we set the env. Though the user will still get the errors first
the only things where I’m still using spacemacs is: a) REPL integration b) indentation. Sadly atoms auto-indent is really bad compared to what emacs has
@dvcrn: @geksilla do you know if it's possible to get highlighting of namespace segments in vars similar to how clojure-mode does it?
yeah, just found this: https://github.com/atom/language-clojure/blob/master/grammars/clojure.cson#L276-L286
do you know if there's a way to edit the grammar or styling for an existing/loaded package?
but in this case i think it would be better to create issue or send PR to language-clojure
opened this for tracking https://github.com/atom/language-clojure/issues/36
@geksilla: do you have a snippet of how this can be done in init.coffee by any chance?
I found some stuff related to injections but these all seemed to assume .cson files
@martinklepsch: are you on linux, mac, windows?
@geksilla: thanks a lot for taking the time, appreciate it 👍
and put following content:
path = require 'path'
atom.grammars.loadGrammarSync(path.join(process.env.ATOM_HOME, './user-grammar.cson'))
sweeeeeeeeet! 🎉
to check out that your grammar loaded open dev tools and execute snippet:
atom.grammars.grammars.filter(x => x.scopeName === 'mygrammar')
here is user-grammar.cson
i've tested:
'name': 'MyGrammar'
'scopeName': 'mygrammar'
'injectionSelector': 'source.coffee'
'patterns': [
{
'match': 'atom'
'name': 'variable.assigment.coffee'
}
]
I just copied the clojure.cson and modified some stuff and after reloading my changes become visible
yeah, I was thinking I could just fiddle inside .atom
but the file is not there
so I think there is actually a way symbols and their namespaces are separated, I assume that just most themes don't differentiate them
'namespace-symbol':
'patterns': [
{ # copied from #symbol, plus a / at the end. Matches the "app/" part of
# "app/*config*"
'match': '([\\w\\.\\-\\_\\:\\+\\=\\>\\<\\!\\?\\*][\\w\\.\\-\\_\\:\\+\\=\\>\\<\\!\\?\\*\\d]+)/'
'captures':
'1':
'name': 'meta.symbol.namespace.clojure'
}
]
'symbol':
'patterns': [
{
'match': '([\\w\\.\\-\\_\\:\\+\\=\\>\\<\\!\\?\\*][\\w\\.\\-\\_\\:\\+\\=\\>\\<\\!\\?\\*\\d]+)'
'name': 'meta.symbol.clojure'
}
]
looking into the theme bit right now
yes but namespace symbol captured for string like:
(= js/process.platform "win32")
but not for:
(js/process.platform "win32")
ah I see
@geksilla: how that? I tried using the snippet here but no luck: https://atom.io/docs/v1.4.1/upgrading-to-1-0-apis-upgrading-your-syntax-theme
and paste
[data-grammar*="clojure"]::shadow {
.meta.symbol.namespace.clojure {
color: red;
}
}
I actually don't use proton 😄
nice! I didn't have the data-grammar thing
@martinklepsch: then you should definitely use proton
@dvcrn: I've never used spacemacs so that whole "everything via SPC" is a bit alien to me 😄
@martinklepsch: if you like vim, give it a shot!
I use vim mode (and use evil when using emacs)
@geksilla: hmm is there a solution without shell-path? Now we have node dependencies for one dependency
I think it makes things a little bit more complex because we have to navigate into plugin/ first and then do npm install. Maybe we can trigger it from leiningen
@martinklepsch: it’s still just vim-mode with some functionality on the spacebar
@dvcrn: I might give it a try when I'm a bit more fluent w/ atom. In the past I systematically avoided any kind of configuration packaging so that might also play a role
hmm I wanna get rid of the proton-mode repository somehow. It’s silly to have a binary git repo just for release
So I think I'm going to recreate a Sublime Text plugin I made, but for Atom. I figured this would give me a good chance to get more used to clojure. Did you guys have trouble getting clojurescript to play nice with Atom?
@dvcrn: What do you think about SPC B
for a bookmarks menu?
is there an easy way to add key binds for existing functions? One that I miss from spacemacs is Space>f>s to save a file
In the :keybindings {}
part of your .proton
file
SPC _ d
to open your dotfile, that part should be near the bottom
I'm not sure how to specify the :target actions/get-active-editor
inside the .proton
file, though
thanks. Is there somewhere I can see what kind of format it expects for the map?
Yeah, take a look at some of the layers for formatting. I'll link you to one.
awesome
https://github.com/dvcrn/proton/blob/master/src/cljs/proton/layers/lang/csharp/core.cljs
This is the one I wrote
Starting on line 24
That's the format
the :target
part is unnecessary for file saving
I assume that if I want to make my own layer, I need to go through the build process?
Yes, you will
If you're just using the binary one, you won't have the source available. Just the compiled JS
to switch to building it, should I uninstall the plugin and build from the repo / link?
Those steps are straightforward and easy
yea, read that. Just wasn't clear on whether or not I had to remove the binary or if it would overwrite it
Um, not sure. I suppose it's possible there will be some conflicts. I would recommend removing the proton-mode
just in case.
yea, better to be safe. Thanks for the help
You're welcome. 😄
@dvcrn or @geksilla, how would I go about specifying a :target
in the :keybindings
vector of the .proton
file?
I'm inclined to say that yes, it should be in a layer
hm.. how do I get proton to recognize that a folder named "data" is actually a python module and not to be ignored when doing a project file search? adding it to projects.cson didn't work.
(yea, I know its a bad name for a module, but still..)
You mean using Atom's "Find in Project" feature?
Using what keybinding? SPC p f
or SPC p /
?
the former
That's just using the atom fuzzy-finder
package
In core settings, there is a config option for Ignored Names
. If you don't have data
in there, then it shouldn't be ignoring the files in that folder.
The results for fuzzy-finder get cached, so you may need to refresh the editor if they were recently added files
I don't see data as being an ignored name in settings - and it's been in the project since I first created it
Is that a VCS ignored file?
not that I'm aware of
lemme check
It looks like it is because it's grayed out
oh wait. I'm dumb. I ignored it globally when working on another project
Okay, that's it then
^^ That setting is checked by default, which would stop it from showing up
makes sense lol
yup.. that fixed it.
how to apply the changes to .proton
without a restart?
think space>_>r