Fork me on GitHub
#proton
<
2015-12-18
>
dvcrn00:12:54

@geksilla: I was sleeping, sorry simple_smile

dvcrn02:12:51

@geksilla: there by chance?

sglyon04:12:20

@dvcrn: Just sitting down to review your PR

dvcrn04:12:52

you always start to text when I am about to leave for lunch haha

dvcrn04:12:14

I'm not sure if the register-xxx approach is the right one. I tried @geksilla solutions first but ran into a deadend

sglyon04:12:02

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

sglyon04:12:09

Quick question though

dvcrn04:12:35

Also if you have linters you wanna add, feel free to branch off my branch and I cherry-pick it in (no PR necessary)

sglyon04:12:01

(register-layer-dependencies :tools/linter [:linter-pep8])

sglyon04:12:19

This says that the linter-pep8 package has a dependency on the :tools/linter layer, right?

dvcrn04:12:56

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

dvcrn04:12:27

in other words, only use linter-pep8 if the linter layer is enabled

sglyon04:12:53

Or in other other words… if you try to install/activate linter-pep8, you need to activate the linter layer?

sglyon04:12:08

That’s what I thought it should do

dvcrn04:12:10

because linter-pep8 would pull in linter and we don't want that

sglyon04:12:28

won’t apm be smart enough not to double install packages though?

dvcrn04:12:04

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

sglyon04:12:15

Ahh yeah that would be lame

dvcrn04:12:27

We want a scenario where linters are only active when the linter layer is active

sglyon04:12:48

Ok cool. Now I understand the goal better. I can take a look at the code

dvcrn04:12:46

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

dvcrn04:12:52

Anyway I'm heading for food

sglyon04:12:23

When you get back I’m having issues getting this PR to run

sglyon04:12:15

I broke something

sglyon04:12:35

Now I can’t get master or the pr to build

sglyon05:12:19

Not sure I’m bisecting right now.

dvcrn05:12:01

what did you try to do?

sglyon05:12:38

I was on a few days old master and updated tonight and things don’t work

dvcrn05:12:19

can you show me your .proton?

dvcrn05:12:42

what this was supposed to do is fix merging vectors of vectors

sglyon05:12:07

{
  :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"]]}]}

sglyon05:12:21

It’s kinda long… I’m only partially done moving my config into layers 😉

dvcrn05:12:25

can you try renaming it to something else and see if you still have the error?

dvcrn05:12:32

ala mv /.proton /.proton.bak

sglyon05:12:39

Haha worked… but now atom is uninstalling everything...

dvcrn05:12:59

so something in your config is messing with it

sglyon05:12:29

I guess so

dvcrn05:12:34

let me try something

dvcrn05:12:55

["racer.racerBinPath", "/Users/sglyon/.cargo/bin/racer"]

dvcrn05:12:59

you have a comma in there 😛

dvcrn05:12:01

maybe that?

dvcrn05:12:13

not sure if it messes with edn or is compliant

dvcrn05:12:01

also is nuclide quick open working for you? for me it just laggs like crazy

sglyon05:12:33

Comma was a problem, but that didn’t fix it

sglyon05:12:56

It only works when I do apm uninstall EVERYTHING-NUCLIDE and then reinstall from command line while atom is closed

sglyon05:12:16

Then it takes a little bit of time to warm up when I next launch atom and works fine after that

dvcrn05:12:26

that's odd

sglyon05:12:45

The error I get when using my ~/.proton is

dvcrn05:12:11

most of your additional packages are btw part of a layer 😛

sglyon05:12:24

And it hangs when initialising layers

sglyon05:12:36

haha yeah i bet I haven’t been good at keeping my .proton up to date

dvcrn05:12:52

you don't have any merge conflicts or something?

dvcrn05:12:02

can you try to delete plugin/lib and just recompile fresh?

sglyon05:12:24

I actually just nuked the whole repo and re-cloned

dvcrn05:12:49

with your proton file or clean?

sglyon05:12:56

with my proton

sglyon05:12:02

it seems to work with a clean proton file

dvcrn05:12:27

ah I think I got it

dvcrn05:12:51

forget that

dvcrn05:12:57

let me try to paste your config into mine and see what it does

sglyon05:12:53

I actually think it is one of the layers

sglyon05:12:14

Probably Julia as I thin I’m the only one that uses it

sglyon05:12:09

So with a fresh ~/.proton it hangs when I enable the latex layer

dvcrn05:12:06

yeah, when I remove latex from yours, it's working

dvcrn05:12:12

that's strange

sglyon05:12:49

I want to switch how that works anyway

dvcrn05:12:45

btw with the changes I made in my branch we should probably start removing empty functions

dvcrn05:12:15

(defmethod get-initial-config :lang/latex []
  ["proton.lang.latex.use-latex-plus" false])

dvcrn05:12:25

that's the problem. It's returning a vector and not a vector of vectors

dvcrn05:12:47

it worked before because our merging code was wrong

sglyon05:12:03

So so just add more [ ]?

dvcrn05:12:47

merged it into master and my branch

dvcrn05:12:52

just do git reset --hard origin/linter

dvcrn05:12:18

["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 core

dvcrn05:12:24

the blue tabs especially

sglyon05:12:19

Yeah it made the UI a bit more subtle, which I like

dvcrn05:12:42

I wish we could somehow make the sidebar a bit smaller

dvcrn05:12:45

I like material but it's huuuge

sglyon05:12:18

sidebar as in project tree?

sglyon05:12:01

That’s one reason why I was using Isotope ui

dvcrn05:12:09

yeah I'm not that happy with the current ui

dvcrn05:12:18

I think we need to find something else

sglyon05:12:27

I’m just getting used to material, but would be happy for something else too

sglyon05:12:59

Have you used isotope ui?

dvcrn05:12:57

never did simple_smile

dvcrn05:12:35

most of the times I have tab-bar and file tree hidden anyway

dvcrn05:12:58

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

dvcrn05:12:09

for themes, if you have something better, please feel free to put it in

dvcrn05:12:09

isotope-ui + material syntax could work as default

dvcrn06:12:11

oh material has a compact tree view option

sglyon06:12:46

I especially like isotope’s minimal mode

sglyon06:12:08

Makes the tree view much more compact and tab bar smaller

dvcrn06:12:42

I like it too but I think it's a bit too biased 😛

dvcrn06:12:30

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

sglyon06:12:46

haha that would be cool.

sglyon06:12:58

Then people can submit their theme config for other users to “try on"

sglyon06:12:52

Whoa, that’s a long comment

sglyon06:12:56

But quite helpful

sglyon06:12:44

For some reason when I have this in my config:

["core.themes" ["isotope-ui" "atom-material-syntax”]]

sglyon06:12:17

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

dvcrn06:12:38

that's why we excluded themes from wiping

sglyon06:12:44

Yeah weird

sglyon06:12:55

check this out:

sglyon06:12:14

proton|linter ⇒ cat ~/.atom/config.cson
"*":
  "file-watcher": {}
  "exception-reporting": {}
  welcome:
    showOnStartup: false
  core:
    themes: [
      "isotope-ui"
      "atom-material-syntax"
    ]

sglyon06:12:24

So that is (part of) what proton generated for me

sglyon06:12:37

Then if I go into atom’s settings manager and click the themes tab I see

dvcrn06:12:08

is isotope installed?

sglyon06:12:10

So it is definitely not doing what we want here — seems like for the theme we are overwriting stuff

sglyon06:12:11

yeah if I move the dropdown right there to isotope all is well

dvcrn06:12:09

after and before. What do you think? Tweaked the material theme a bit

sglyon06:12:30

Definitely better

dvcrn06:12:41

slightly more colorful, smaller tabs / file-tree, visual distinguishable panels

sglyon06:12:03

I’d like even more compact in the tree view, but I don’t think you can without mucking around in your stylesheet

dvcrn06:12:13

yeah we need a very solid default and then give the option to make it however the user wants

dvcrn06:12:17

so we need to find a sweetspot 😛

sglyon06:12:41

I don’t get why it is killing my isotope though...

sglyon06:12:45

That’s a bummer

dvcrn06:12:28

let me try

dvcrn06:12:46

yeah same here

dvcrn06:12:50

I think I know why

dvcrn06:12:34

we need to move config setting after package installation (my guess)

dvcrn06:12:58

can you try that? Just move the block down and see if it's changing it

sglyon06:12:34

I’ll try it out. updating handling config in latex layer right now

dvcrn06:12:46

It's already in master

dvcrn06:12:19

lol now I have a weird isotope material mix when I tried to switch back

sglyon06:12:30

yeah it’s weird for sure

dvcrn06:12:38

it has the animations of material but the looks of isotope

sglyon06:12:41

No I’m updating how I handle the package list based on config — not the vector of vectors thing

sglyon06:12:00

I liked your approach in the linter layer more

dvcrn06:12:05

if you have more theme ideas btw, put them in here https://github.com/dvcrn/proton/pull/59

sglyon06:12:37

Ok, will do once we can choose other themes 😉

dvcrn06:12:07

you can always suggest things simple_smile

dvcrn06:12:53

ah crap now I remember why we had that change for disabled-package

dvcrn06:12:00

stuff like hideTabBar doesn't work anymore

dvcrn06:12:28

stuff that disables / enables packages on init

sglyon06:12:15

Was there a specific reason you took that out in the linter branch?

dvcrn06:12:50

I tried to solve the problem that packages that are required are disabled

dvcrn06:12:58

maybe we need to force-enable all of them after init

sglyon06:12:54

Why are required packages disabled?

dvcrn06:12:56

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

dvcrn06:12:18

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

sglyon06:12:00

Hmm. could we flush that key to remove all uninstalled packages at the end of config?

dvcrn06:12:25

well we need to keep track of which packages we want to have disabled. Like tab-bar for example

dvcrn06:12:35

I think it might be easier to just make sure what we need is enabled and not disabled 😛

sglyon06:12:06

So you’re saying we want to make the tab-bar toggle persist across sessions?

dvcrn06:12:25

;; 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 load

dvcrn06:12:30

same thing for relativeLineNumbers

sglyon06:12:08

OK cool, so we have persistent state for that already (in the config file)

dvcrn06:12:16

had 😛 until I removed that in my linter brach

sglyon06:12:44

I still think it’d be wise to flush that config key

dvcrn06:12:17

but if we flush it and tab-bar is disabled through proton, atom would load it again

sglyon06:12:55

by flush I mean remove packages that aren’t installed anymore — don’t touch anything else

dvcrn06:12:41

that was the other problem I had. Disabled packages didn't show up in atoms API anymore

sglyon06:12:22

Moving config below install didn’t help

dvcrn06:12:00

The config application, right?

sglyon06:12:04

;; 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!)

sglyon06:12:11

I moved that to be the last init item (after removing deleted packages)

dvcrn06:12:17

that's odd

sglyon06:12:46

Did we ever do anything about letting the user chose vim vs vim-plus?

dvcrn06:12:56

too many bugs that keep us busy 😛

sglyon06:12:22

I think it has come a long way in the few weeks I’ve been keeping up though

dvcrn07:12:35

it did! We made huge progress

sglyon07:12:37

Well, predicatably if I set isotope to be my theme from the default config section of the core layer it works fine

dvcrn07:12:52

can you maybe print out the entire config?

dvcrn07:12:58

I have a fear that it has been set twice

dvcrn07:12:31

if that's the case, we need to write a filter function that filters based on the config key (first element in the vector)

sglyon07:12:05

nope, just once

sglyon07:12:10

It’s very strange

dvcrn07:12:31

sure about that? Because I think we don't filter it

dvcrn07:12:58

all-configuration

sglyon07:12:10

grep was sure themes only showed up once

dvcrn07:12:30

well something is fishy here

sglyon07:12:03

If we end up liking the linter solution we can do something similar for the build family of packages

sglyon07:12:25

Also, what do you think about project-manager

sglyon07:12:34

I don’t think I could use atom without it

sglyon07:12:42

Maybe we should throw it in to the default config?

dvcrn07:12:47

I never used it to be honest, but it sounds like something that should be in there by default

dvcrn07:12:07

I miss SPC p p from spacemacs

sglyon07:12:25

well, project-manager would bring it back 😉

dvcrn07:12:30

ah can you create a issue for the theme bug?

dvcrn07:12:30

(or if you can fix it right away 😉 )

sglyon07:12:37

I tried for a bit, but didn’t succeed. I have to move on to one more thing before calling it a night

sglyon07:12:26

Can we make the timeout on closing the proton modal panel shorter? I think the 3 second delay is too long

dvcrn07:12:42

we could allow changing it inside .proton

sglyon07:12:47

that’d be cool

sglyon07:12:39

OK well that was the last one from me tonight — I really do need to do that one more thing and get some sleep

geksilla10:12:01

linter layer looks very good.

geksilla10:12:02

and +1 for project manager. I also was preparing pm integration PR

geksilla10:12:43

also wanna to add https://atom.io/packages/imdone-atom to

:apps/imdone
and appropriate keybingings within
SPC a 
category

geksilla10:12:55

yesterday sent PR to add .cljs, .cljc to supported languages

geksilla14:12:57

added javascript layer on top of linters branch, will send PR when linters will be merged.

dvcrn15:12:57

Oh that's great!

dvcrn15:12:12

Just need to fix the package disabling then I'm merging

dvcrn15:12:24

I could also cherry pick your changes if you want

sglyon15:12:40

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.

geksilla15:12:58

@dvcrn: I'll wait until merge

geksilla15:12:32

i'm still testing it and searching for additional packages

dvcrn16:12:20

there’s lot of things to do if you’re looking for work 😛

geksilla16:12:11

i'll try to do some on weekend )

geksilla16:12:31

have to do my full time job now )

geksilla16:12:50

and still learning clojure/clojurescript

geksilla16:12:21

this project is my first experience

geksilla16:12:06

also i created one package for atom inspired by helm-ag https://github.com/geksilla/atom-fuzzy-grep

geksilla16:12:50

i'm using it now with proton via .proton

geksilla16:12:49

i guess i've found how to fix themes

geksilla16:12:00

i'll send PR, it works but a little bit tricky

geksilla16:12:54

after we set core.themes value we need to call atom.themes.activateThemes()

geksilla17:12:41

this part hacky a bit:

(.setTimeout js/window #(atom-env/activate-theme!) 1000)

dvcrn17:12:38

it’s strange that it happens in the first place. We don’t wipe the theme settings

dvcrn17:12:55

maybe we can try to only set a config setting if it doesn’t exist yet

geksilla17:12:20

(doall (map #(atom-env/set-config! (get % 0) (get % 1)) all-configuration))
all-configuration has 2 configs core.themes default value and user's value

geksilla17:12:11

and we set 2 times core.themes to configs

geksilla18:12:50

I've updated PR. Seems like one line fix