Tehnix / spaceneovim-layers

Layers for usage in SpaceNeovim 👉
https://github.com/Tehnix/spaceneovim
MIT License
43 stars 7 forks source link

API enhancements #25

Open Tehnix opened 7 years ago

Tehnix commented 7 years ago

Pinging @lowski

I was wondering if you had any wishes for improvements to the layer workflow? Like missing functions, renaming things etc.

I'll also use this opportunity to let you know that I've more or less revamped the user API in init.vim to add layers. Feels much cleaner! Check out the README in https://github.com/Tehnix/spaceneovim and let me know if you have any thoughts :)

lcmen commented 7 years ago

@Tehnix I will it check over the weekend but it would be much easier to have diff from PR to go through :).

Regarding improvements here are some ideas from top of my head:

  1. Add additional parameter to function with indentation whether we want to use tabs or spaces - some languages (i.e. GO) prefer tabs.
  2. Switch from deoplete to https://github.com/prabirshrestha/asyncomplete.vim - I've been testing it for almost 2 weeks and it's really good. It works on VIM8 and Neovim without Python dependency.
  3. Switch from neomake to https://github.com/w0rp/ale - it also works on VIM8 and Neovim

I believe 2 and 3 will make the whole project compatible with VIM8 and Neovim :).

UPDATE: I have a problem with asyncomplete.vim and showing omnicompletions (issue). Until it's resolved there is no point to replace deoplete.

lcmen commented 7 years ago

Hey @Tehnix . I gave it a shot. I will list all issues here and we can create tickets in proper repos.

Let's start with installation script. When I ran it, I got the following error:

$ sh -c "$(curl -fsSL https://raw.githubusercontent.com/tehnix/spaceneovim/master/install.sh)"
Error detected while processing /Users/lucas/.config/nvim/spaceneovim-layers/layers/+core/behavior/config.vim:
line   11:
E174: Command already exists: add ! to replace it
E174: Command already exists: add ! to replace it
Press ENTER or type command to continue

New API:

  1. I think there is missing info (i.e. comment) about config for ExtraPlugin function. It's not clear how to provide config for the plugin without checking the source code. Previously, example in the init.vim contained config declaration (I don't remember exactly but it was something like this: {'name': 'arcticicestudio/nord-vim', 'config': {}}).
  2. The same remark goes to setting a colorscheme. I.e. I don't set background for my colorscheme but I do set theme for airline. It's not easy to spot that 3rd argument is actually for airline :). Some comment would be helpful as well.

Critical issue: leader guide does not show all bindings (i.e. <leader>fe does not show anything, <leader>f shows only spaceneovim/files - there are no bindings for NERDTree). Even if I try to use invisible bindings anyway they don't work (i.e. typing <leader>ft does not open NERDTree).

PS. I think it would be good to test bigger refactoring like on separate branch instead of pushing directly to master. WDYT? PPS. Have you started using spaceneovim daily again?:)

Tehnix commented 7 years ago

Yeah, I definitely should have run this through a separate branch before pushing, I'm a little bit too used to no one using my projects, lol :O .

I've pushed some larger changes in https://github.com/Tehnix/spaceneovim-layers/tree/refactor and https://github.com/Tehnix/spaceneovim/tree/refactor that solve some of the issues - you can also see the documentation for the various commands in that one.

Two remaining ones, one mentioned in https://github.com/Tehnix/spaceneovim/issues/23#issuecomment-325303498, is a problem when opening files directly and some strange behaviour. I'll try to dig further down into that one. And the other one is I just need to look at the install script and make sure it runs smoothly.

And yeah, I have more or less begun to use it, or at least try to fix all these errors so it'll run smoothly :)