Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems with crystal tools and Syntastic #47

Closed
NIFR91 opened this issue Jan 17, 2018 · 10 comments
Closed

Problems with crystal tools and Syntastic #47

NIFR91 opened this issue Jan 17, 2018 · 10 comments

Comments

@NIFR91
Copy link

NIFR91 commented Jan 17, 2018

Hi,

I can't use any crystal command like :CrystalFormat , :CrystalDef, etc. Also there is no checking when running :SyntasticCheck

I installed vim-crystal with Vundle Plugin
using Plugin 'https://github.com/rhysd/vim-crystal.git'. Im relative new to using vim so i need a little help to know what im doing wrong or if theres currently a problem with the pluggin.

Im using

Vim 
   VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Sep 30 2017 18:21:38)

Crystal 
  Crystal 0.24.1 (2017-12-22)
  LLVM: 4.0.0
  Default target: x86_64-unknown-linux-gnu

OS 
  Debian GNU/Linux 9.3 (stretch) x86_64

an example of the erros I have when running :CrystalDef (gd) is:

Error detected while processing /home/nieto/.vim/bundle/vim-crystal/autoload/cry
stal_lang.vim:
line    4:
E117: Unknown function: vital#crystal#new
E15: Invalid expression: vital#crystal#new()
line    5:
E121: Undefined variable: s:V
E15: Invalid expression: s:V.import('Process')
line    6:
E121: Undefined variable: s:V
E15: Invalid expression: s:V.import('ColorEcho')
analyzing definitions under cursor...
Error detected while processing function crystal_lang#jump_to_definition[3]..cry
stal_lang#impl[1]..crystal_lang#tool[14]..<SNR>101_run_cmd:
line    4:
E121: Undefined variable: s:P
E15: Invalid expression: s:P.system(a:cmd)

@rhysd
Copy link
Member

rhysd commented Jan 17, 2018

I guess vim-crystal/autoload/vital directory is missing in your installation. How did you install vim-crystal?

@rhysd
Copy link
Member

rhysd commented Jan 17, 2018

Could you please show the output of following commands?

$ cd ~/.bundle/vim
$ tree vim-crystal

@NIFR91
Copy link
Author

NIFR91 commented Jan 17, 2018

Hi,

I installed it using the pluging mannager Vundle, adding
the line Plugin 'https://github.com/rhysd/vim-crystal.git' in my .vimrc, and then running
:PluginInstall in command mode of Vim.

The output if the commands

cd ~/.vim/bundle/
tree vim-crystal 

is

vim-crystal/
├── autoload
│   ├── crystal_lang.vim
│   └── vital
│       ├── _crystal
│       │   ├── ColorEcho.vim
│       │   ├── Data
│       │   │   ├── List.vim
│       │   │   └── String.vim
│       │   ├── Process.vim
│       │   └── Web
│       │       └── JSON.vim
│       ├── _crystal.vim
│       └── crystal.vital
├── ftdetect
│   └── crystal.vim
├── ftplugin
│   └── crystal.vim
├── indent
│   └── crystal.vim
├── plugin
│   └── crystal.vim
├── README.md
├── syntax
│   └── crystal.vim
└── syntax_checkers
    └── crystal
        ├── ameba.vim
        └── crystal.vim

@ceclinux
Copy link

my vim

vim --version
VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Dec 19 2017 20:38:43)
1-1415

same error message and same tree structure

@rhysd
Copy link
Member

rhysd commented Jan 18, 2018

Hm, nothing looks wrong... ok, I'll investigate further.

Could you try following command in Vim?

:call vital#crystal#new()

Does it also cause an error in your Vim?

@rhysd
Copy link
Member

rhysd commented Jan 18, 2018

@ceclinux are you also using Vundle.vim?

@rhysd
Copy link
Member

rhysd commented Jan 18, 2018

I've found the reason. I forgot adding one more file to load some libraries. I'll fix this soon.

@rhysd rhysd closed this as completed in 71a14b9 Jan 18, 2018
@rhysd
Copy link
Member

rhysd commented Jan 18, 2018

@NIFR91 @ceclinux I fixed this at 71a14b9. Please update to the latest. I'm sorry for inconvenience.

@NIFR91
Copy link
Author

NIFR91 commented Jan 18, 2018

@rhysd Thanks.

After update everything is working ( :Crystal commands and Syntastic ) 😄 .

Great plugging ❤️

@ceclinux
Copy link

@rhysd good job, works after fix 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants