@geksilla: I was sleeping, sorry :simple_smile:
@geksilla: there by chance?
@dvcrn: Just sitting down to review your PR
you always start to text when I am about to leave for lunch haha
I'm not sure if the register-xxx
approach is the right one. I tried @geksilla solutions first but ran into a deadend
Haha funny timing. I’ll go through another PR first and then start on yours. Maybe you’ll be back when I have some feedback
Quick question though
great!
Also if you have linters you wanna add, feel free to branch off my branch and I cherry-pick it in (no PR necessary)
(register-layer-dependencies :tools/linter [:linter-pep8])
This says that the linter-pep8
package has a dependency on the :tools/linter
layer, right?
hmm maybe a different name for that fx is better... it means that :linter-pep8 depends on :tools/linter. If :tools/linter is not there, :linter-pep8 is not resolved
ok
in other words, only use linter-pep8 if the linter layer is enabled
Or in other other words… if you try to install/activate linter-pep8, you need to activate the linter layer?
yes
ok cool
That’s what I thought it should do
because linter-pep8 would pull in linter and we don't want that
won’t apm be smart enough not to double install packages though?
I mean, linter-pep8 installs linter
even though the linter layer is not enabled. So on restart, proton would wipe linter
(because it's not enabled) and linter-pep8
would install it again
Ahh yeah that would be lame
We want a scenario where linters are only active when the linter layer is active
Ok cool. Now I understand the goal better. I can take a look at the code
I did a lot of refactoring.
- Empty multimethods don't need to be inside layers anymore
- init-layer!
is now receiving config
and layers
- added a new print function that distinguishes proton messages on the console from the rest
- introduction of the register-{{xxx}}-dependencies
function
Anyway I'm heading for food
BRB
Hmm
When you get back I’m having issues getting this PR to run
Shoot
I broke something
Now I can’t get master or the pr to build
back
@sglyon: whats up
Not sure I’m bisecting right now.
what did you try to do?
I was on a few days old master and updated tonight and things don’t work
This commit is the culprit somehow: https://github.com/dvcrn/proton/commit/7ab8693ca60a457d4e96a02374396bdd9c3302f9
can you show me your .proton?
what this was supposed to do is fix merging vectors of vectors
{
:layers
[
:core
:tools/git
:tools/minimap
:lang/clojure
:lang/python
:lang/julia
:lang/latex
:lang/markdown
; :lang/rust
]
:additional-packages
[
:advanced-open-file
:build
:build-make
:nvatom
:tomorrow-night-eighties-syntax
:project-manager
:language-matlab-only
:markdown-preview-plus
:markdown-writer
:date
:file-icons
:merge-conflicts
:time-status
:battery-status
:atom-alignment
:nuclide-quick-open
:nuclide-fuzzy-filename-provider
:nuclide-open-filenames-provider
:nuclide-recent-files-provider
:nuclide-recent-files-service
:comment-commander
; :indent-detective
]
:configuration
[
;; appearance
["atom-material-ui.ui.accentColor" "Blue"]
["atom-material-ui.tabs.showTabIcons" "Show on active tab"]
["atom-material-ui.tabs.tabMinWidth" true]
["atom-material-ui.tabs.tabSize" "Small"]
; ["atom-material-ui.fonts.fontSize" "Small"]
["atom-material-ui.panels.panelContrast" true]
["editor.lineHeight" 1.2]
["editor.tabLength" 4]
["editor.softWrap" true]
["editor.softWrapHangingIndent" 2]
["editor.fontFamily" "Hasklig-ExtraLight"]
["editor.fontSize" 11]
["editor.scrollPastEnd" true]
["editor.showIndentGuide" true]
["editor.backUpBeforeSaving" true]
["editor.tabType" "soft"]
["tabs.showIcons" true]
["tabs.usePreviewTabs" true]
["tabs.enableVcsColoring" true]
;; markdown settings
["markdown-preview-plus.pandocPath" "/usr/local/bin/pandoc"]
["markdown-preview-plus.enablePandoc" true]
["markdown-preview-plus.pandocBibliography" true]
["markdown-preview-plus.pandocBIBFileFallback" "/Users/sglyon/Research/library.bib"]
["markdown-preview-plus.pandocCSLFileFallback" "/Users/sglyon/.pandoc/csl/apsa.csl"]
["markdown-preview-plus.pandocMarkdownFlavor" "markdown+implicit_figures+pipe_tables+table_captions+yaml_metadata_block+fenced_code_blocks+fenced_code_attributes+tex_math_dollars"]
["markdown-preview-plus.pandocArguments" ["--template=/Users/sglyon/.pandoc/templates/html.template"
"--filter pandoc-citeproc"]]
["markdown-writer.fileExtension" ".md"]
["markdown-writer.tableExtraPipes" true]
;; other
["ink.monotypeResults" true]
["nvatom.directory" "/Users/sglyon/Research/randomNotes"]
["spell-check.grammars" ["source.gfm"
"source.git-commit"
"text.tex.latex"
"text.html.php"]]
["atom-alignment.addSpacePostfix" true]
["atom-alignment.alignBy" ["=>" ":=" "=" "$" "&" "#"]]
["autocomplete-plus.confirmCompletion" "tab"]
["racer.racerBinPath", "/Users/sglyon/.cargo/bin/racer"]
["racer.rustSrcPath" "/Users/sglyon/src/rust/src"]
;; stuff for proton
["proton.core.showTabBar" true]
["proton.core.quickOpenProvider" :nuclide]
["proton.core.relativeLineNumbers" true]]
;; Don't like a keybinding or want to add something yourself? Do it here
;; (not implemented yet)
:keybindings {}
;; Want some custom behavior inside a certain window?
;; For example you prefer navigating with esc and enter? Add it here.
:keymaps [{:selector ".tree-view" :keymap [["escape" "tree-view:toggle"]]}]}
It’s kinda long… I’m only partially done moving my config into layers 😉
hmmmm
can you try renaming it to something else and see if you still have the error?
ala mv /.proton /.proton.bak
Haha worked… but now atom is uninstalling everything...
so something in your config is messing with it
I guess so
let me try something
["racer.racerBinPath", "/Users/sglyon/.cargo/bin/racer"]
you have a comma in there 😛
maybe that?
not sure if it messes with edn or is compliant
also is nuclide quick open working for you? for me it just laggs like crazy
Comma was a problem, but that didn’t fix it
It only works when I do apm uninstall EVERYTHING-NUCLIDE
and then reinstall from command line while atom is closed
Then it takes a little bit of time to warm up when I next launch atom and works fine after that
that's odd
The error I get when using my ~/.proton is
most of your additional packages are btw part of a layer 😛
And it hangs when initialising layers
haha yeah i bet I haven’t been good at keeping my .proton up to date
you don't have any merge conflicts or something?
can you try to delete plugin/lib and just recompile fresh?
I actually just nuked the whole repo and re-cloned
no luck
huh
with your proton file or clean?
with my proton
it seems to work with a clean proton file
ah I think I got it
ah no
forget that
let me try to paste your config into mine and see what it does
I actually think it is one of the layers
Probably Julia as I thin I’m the only one that uses it
So with a fresh ~/.proton it hangs when I enable the latex layer
yeah, when I remove latex from yours, it's working
hrrrmmm
that's strange
I want to switch how that works anyway
btw with the changes I made in my branch we should probably start removing empty functions
(defmethod get-initial-config :lang/latex []
["proton.lang.latex.use-latex-plus" false])
that's the problem. It's returning a vector and not a vector of vectors
it worked before because our merging code was wrong
ahh ok
So so just add more [
]
?
merged it into master and my branch
just do git reset --hard origin/linter
sweet
["atom-material-ui.ui.accentColor" "Blue"]
["atom-material-ui.tabs.showTabIcons" "Show on active tab"]
["atom-material-ui.tabs.tabMinWidth" true]
["atom-material-ui.tabs.tabSize" "Small"]
; ["atom-material-ui.fonts.fontSize" "Small"]
["atom-material-ui.panels.panelContrast" true]
i like this. maybe we can put some of it into corethe blue tabs especially
Yeah it made the UI a bit more subtle, which I like
I wish we could somehow make the sidebar a bit smaller
I like material but it's huuuge
sidebar as in project tree?
yes that
That’s one reason why I was using Isotope ui
yeah I'm not that happy with the current ui
I think we need to find something else
I’m just getting used to material, but would be happy for something else too
Have you used isotope ui?
never did :simple_smile:
most of the times I have tab-bar and file tree hidden anyway
speaking of which, we should probably fix SPC tab
. I wanted to copy spacemacs behaviour to always jump to the last buffer but it behaves weird
for themes, if you have something better, please feel free to put it in
isotope-ui + material syntax could work as default
oh material has a compact tree view option
I especially like isotope’s minimal mode
Makes the tree view much more compact and tab bar smaller
I like it too but I think it's a bit too biased 😛
would be cool if we could add "theme" layers or something like that. [theme :sglyon]
and then it downloads that theme, sets the configs and so on
haha that would be cool.
Then people can submit their theme config for other users to “try on"
yep!
Whoa, that’s a long comment
But quite helpful
Hmm
For some reason when I have this in my config:
["core.themes" ["isotope-ui" "atom-material-syntax”]]
It loads isotope properly before proton init starts, but as soon as proton finishes loading it goes to a funky state where it is 1/2 isotope 1/2 material
uhmmm
that's why we excluded themes from wiping
hrm
Yeah weird
check this out:
proton|linter ⇒ cat ~/.atom/config.cson
"*":
"file-watcher": {}
"exception-reporting": {}
welcome:
showOnStartup: false
core:
themes: [
"isotope-ui"
"atom-material-syntax"
]
So that is (part of) what proton generated for me
Then if I go into atom’s settings manager and click the themes tab I see
lol
is isotope installed?
So it is definitely not doing what we want here — seems like for the theme we are overwriting stuff
yeah if I move the dropdown right there to isotope all is well
after and before. What do you think? Tweaked the material theme a bit
Definitely better
slightly more colorful, smaller tabs / file-tree, visual distinguishable panels
I’d like even more compact in the tree view, but I don’t think you can without mucking around in your stylesheet
yeah we need a very solid default and then give the option to make it however the user wants
so we need to find a sweetspot 😛
I don’t get why it is killing my isotope though...
That’s a bummer
let me try
yeah same here
I think I know why
we need to move config setting after package installation (my guess)
can you try that? Just move the block down and see if it's changing it
I’ll try it out. updating handling config in latex layer right now
It's already in master
lol now I have a weird isotope material mix when I tried to switch back
yeah it’s weird for sure
it has the animations of material but the looks of isotope
No I’m updating how I handle the package list based on config — not the vector of vectors thing
I liked your approach in the linter layer more
if you have more theme ideas btw, put them in here https://github.com/dvcrn/proton/pull/59
Ok, will do once we can choose other themes 😉
you can always suggest things :simple_smile:
ah crap now I remember why we had that change for disabled-package
stuff like hideTabBar
doesn't work anymore
stuff that disables / enables packages on init
Was there a specific reason you took that out in the linter branch?
I tried to solve the problem that packages that are required are disabled
maybe we need to force-enable all of them after init
Why are required packages disabled?
on one side the user can just disable it, on the other side when we remove a package, we add it to the disabledPackages
first so atom unloads it
but that key is never getting cleaned up so when the user enables the layer again and the package gets installed, it doesn't get enabled
Hmm. could we flush that key to remove all uninstalled packages at the end of config?
well we need to keep track of which packages we want to have disabled. Like tab-bar for example
I think it might be easier to just make sure what we need is enabled and not disabled 😛
So you’re saying we want to make the tab-bar toggle persist across sessions?
;; Method definitions
(defmethod get-initial-config :core []
[["proton.core.showTabBar" false]
["proton.core.relativeLineNumbers" false]
these are 2 config keys that have ownership over a package. if showTabBar
is false, proton makes sure that tab-bar
is disabled on loadsame thing for relativeLineNumbers
OK cool, so we have persistent state for that already (in the config file)
had 😛 until I removed that in my linter brach
I still think it’d be wise to flush that config key
but if we flush it and tab-bar
is disabled through proton, atom would load it again
by flush I mean remove packages that aren’t installed anymore — don’t touch anything else
that was the other problem I had. Disabled packages didn't show up in atoms API anymore
Moving config below install didn’t help
didn't?
hmm
The config application, right?
right
;; set the user config
(atom-env/insert-process-step! "Applying user configuration")
(doall (map #(atom-env/set-config! (get % 0) (get % 1)) all-configuration))
(atom-env/mark-last-step-as-completed!)
I moved that to be the last init item (after removing deleted packages)
hmm...
that's odd
Did we ever do anything about letting the user chose vim vs vim-plus?
not yet
too many bugs that keep us busy 😛
haha true
I think it has come a long way in the few weeks I’ve been keeping up though
it did! We made huge progress
Well, predicatably if I set isotope to be my theme from the default config section of the core layer it works fine
can you maybe print out the entire config?
I have a fear that it has been set twice
if that's the case, we need to write a filter function that filters based on the config key (first element in the vector)
nope, just once
It’s very strange
sure about that? Because I think we don't filter it
all-configuration
grep was sure themes
only showed up once
hmmm
well something is fishy here
Agreed.
If we end up liking the linter solution we can do something similar for the build
family of packages
Also, what do you think about project-manager
I don’t think I could use atom without it
Maybe we should throw it in to the default config?
I never used it to be honest, but it sounds like something that should be in there by default
I miss SPC p p
from spacemacs
well, project-manager would bring it back 😉
ah can you create a issue for the theme bug?
Yeah
(or if you can fix it right away 😉 )
I tried for a bit, but didn’t succeed. I have to move on to one more thing before calling it a night
Can we make the timeout on closing the proton modal panel shorter? I think the 3 second delay is too long
we could allow changing it inside .proton
that’d be cool
OK well that was the last one from me tonight — I really do need to do that one more thing and get some sleep
👍
good job
linter layer looks very good.
and +1 for project manager. I also was preparing pm integration PR
also wanna to add https://atom.io/packages/imdone-atom to
:apps/imdone
and appropriate keybingings within SPC a
categoryyesterday sent PR to add .cljs, .cljc to supported languages
added javascript layer on top of linters branch, will send PR when linters will be merged.
Oh that's great!
Just need to fix the package disabling then I'm merging
I could also cherry pick your changes if you want
Imdone is cool. I didn't ever start using it full time because it alters the source of your files (adds their own Metadata to your todo comments) and I was working with others on a project.
@dvcrn: I'll wait until merge
i'm still testing it and searching for additional packages
there’s lot of things to do if you’re looking for work 😛
i'll try to do some on weekend )
have to do my full time job now )
and still learning clojure/clojurescript
this project is my first experience
also i created one package for atom inspired by helm-ag https://github.com/geksilla/atom-fuzzy-grep
i'm using it now with proton via .proton
i guess i've found how to fix themes
i'll send PR, it works but a little bit tricky
after we set core.themes
value we need to call atom.themes.activateThemes()
this part hacky a bit:
(.setTimeout js/window #(atom-env/activate-theme!) 1000)
it’s strange that it happens in the first place. We don’t wipe the theme settings
maybe we can try to only set a config setting if it doesn’t exist yet
(doall (map #(atom-env/set-config! (get % 0) (get % 1)) all-configuration))
all-configuration has 2 configs core.themes
default value and user's valueand we set 2 times core.themes
to configs
I've updated PR. Seems like one line fix