Skip to content
This repository has been archived by the owner on Mar 12, 2024. It is now read-only.

syntax checking does not work #90

Open
randomizedthinking opened this issue Jun 27, 2017 · 15 comments
Open

syntax checking does not work #90

randomizedthinking opened this issue Jun 27, 2017 · 15 comments

Comments

@randomizedthinking
Copy link
Contributor

randomizedthinking commented Jun 27, 2017

The syntax checking does not work. A few symptoms:

  1. When a file is edited, the on-the-fly syntax checking does not get triggered;
  2. When a file is edited then saved, the checked results seem based on the old checking results. Maybe the syntax checking is cached yet not properly?
  3. I did some simple debug, and found b:fsharp_buffer_changed is not updated correctly. Even the file is edited, its value is kept as 0.

I am using neovim 0.2.0, and python3. Thanks.

@kjnilsson
Copy link
Contributor

I don't really test with neovim. Does it work with normal vim?

  1. The check is only done once you enter normal mode + a short interval.

  2. That can happen if the check is very slow and doesn't update a field within some timeout. At some point the whole checking should be changed to use the job api so we don't have to hack around it. Perhaps using ALE.

  3. Could be a neovim issue.

@randomizedthinking
Copy link
Contributor Author

Just tried on a fresh installation of normal vim (debian vim v8.0) with only Synastic and vim-fsharp plugins. Same there. The syntax checking does not work properly.

  1. the checking is correct if reloading the file;
  2. I tried to call fsharpbinding#python#OnTextChanged() directly, yet it has no effect.

@kjnilsson
Copy link
Contributor

did you install mono and run make? you also need pathogen.

@randomizedthinking
Copy link
Contributor Author

Yes, mono etc are installed, and the installation seems okay. For example, if I reload the .fs file using :e, the syntax checking works correctly. If there is any error, the plugin would show them.

@kjnilsson
Copy link
Contributor

I will try to look into this but you could create a Vagrantfile or similar with a repro it would allow me to investigate it more quickly.

@MarcCoquand
Copy link

I have the same issue on os x (vim 8.0 compiled with python3) using vim plug. Pathogen is installed and everything. The rest seems to work just fine it is just the type checking that does not work. The type checking seems to show up at random and doesn't refresh when writing. It also seems to show the same errors even when changing file.

How can I create a Vagrantfile to allow you to investigate?

@kjnilsson
Copy link
Contributor

kjnilsson commented Jan 14, 2018 via email

@pindaroso
Copy link

Bump

@kjnilsson
Copy link
Contributor

@mudrasone I have issues with python3 and normal vim atm. Perhaps the same applies to neovim. Are you able to run neovim with python2 as a test?

@pindaroso
Copy link

pindaroso commented Aug 6, 2018

@kjnilsson The error I experienced was with VIM - Vi IMproved 8.1 (2018 May 18, compiled Jul 22 2018 05:24:30). I'm using MacOS Mojave and have a feeling Python 2 and 3 could be causing issues because after installing nvim and the vim-fsharp plugin, I get this error:

Error detected while processing /Users/ptah/.vim/plugged/vim-fsharp/ftplugin/fsharp.vim:
line   37:
Python environment not found
Press ENTER or type command to continue

How is Python supposed to be setup?

Edit:

Related junegunn/vim-plug#695

@kjnilsson
Copy link
Contributor

Looks like python support isn't installed: see https://github.com/fsharp/vim-fsharp#troubleshooting
for help on how to check it.

@pindaroso
Copy link

I installed the required pip neovim package so the Neovim reports python 2 and 2 are "had", but I'm still experiencing the same issue I with vim.

The Fsi commands run properly, I'm wondering if the issue could just be with Syntastic?

@kjnilsson
Copy link
Contributor

It may be, it can be very hard to tell sometimes, it works ok for me with vim with python2 support. At some point I will consider removing Syntastic in favour of Ale and at the same time remove the python requirement all together.

@erlandsona
Copy link

Today I decided to try rewriting my Elm app w/ Bolero to see if Bolero could ease some of the troubles of having to go between Servant+Haskell & Elm.
Plus just some of the things that seem so well solved by the framework like routing, hot-reloading, isomorphic front/back end code are the things of my dreams!

Ran into issues with the plugin. Went through the troubleshooting steps and made sure I :echo has('python') and :echo has('python3') and both returned 1.

I'm pretty turned off by the fact that there's no ALE support for fsharp so I reluctantly installed Syntastic hoping I'd be good to go from there.

Then I ran into an error about FileOrDirectoryNotFound: 'fsharpi' something something about mono, so I installed mono with sudo apt install mono-devel and now I'm here...

Error detected while processing function provider#python3#Call:
  line   18:
Traceback (most recent call last):
  File "/home/erlandsona/.config/nvim/plugged/vim-fsharp/ftplugin/fsi.py", line 26, in __init__
    self.p = Popen(command, **opts)
  File "/usr/lib/python3.7/subprocess.py", line 800, in __init__
    restore_signals, start_new_session)
  File "/usr/lib/python3.7/subprocess.py", line 1551, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'fsharpi': 'fsharpi'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "<string>", line 28, in <module>
  File "/home/erlandsona/.config/nvim/plugged/vim-fsharp/ftplugin/fsi.py", line 28, in __init__
    raise Exception ('Error executing fsi.  g:fsharp_interactive_bin="' + fsi_path + '" ' + str(e))
Exception: Error executing fsi.  g:fsharp_interactive_bin="fsharpi" [Errno 2] No such file or directory: 'fsharpi': 'fsharpi'
Traceback (most recent call last):
  File "/home/erlandsona/.config/nvim/plugged/vim-fsharp/ftplugin/fsi.py", line 26, in __init__
    self.p = Popen(command, **opts)
  File "/usr/lib/python3.7/subprocess.py", line 800, in __init__
    restore_signals, start_new_session)
  File "/usr/lib/python3.7/subprocess.py", line 1551, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'fsharpi': 'fsharpi'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "<string>", line 28, in <module>
  File "/home/erlandsona/.config/nvim/plugged/vim-fsharp/ftplugin/fsi.py", line 28, in __init__
    raise Exception ('Error executing fsi.  g:fsharp_interactive_bin="' + fsi_path + '" ' + str(e))
Exception: Error executing fsi.  g:fsharp_interactive_bin="fsharpi" [Errno 2] No such file or directory: 'fsharpi': 'fsharpi'

I'm reluctantly installing VSCode to see if it'll "just work" but it's a bummer not to be able to use my favorite editor to try out the language :/

@kjnilsson
Copy link
Contributor

@erlandsona try https://github.com/ionide/Ionide-vim - it works really well.

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

No branches or pull requests

5 participants