ionide / Ionide-vim

F# Vim plugin based on FsAutoComplete and LSP protocol
MIT License
174 stars 21 forks source link

Filetype not automatically set to F# #50

Closed zetashift closed 2 years ago

zetashift commented 2 years ago

Describe the bug Currently when I open any F# related file(fs, fsx, fsproj), I don't get anything from the plugin because the filetype is being recognized as Forth.

To Reproduce Steps to reproduce the behaviour: Not sure, since the docs don't mention anything about this and I think the plugin does it automatically?

Expected behaviour Filetypes fs, fsx being recognized as F#.

Screenshots image

Environment (please complete the following information):

Additional context I can probably fix this by setting an autocommand

tnishimura commented 2 years ago

Are you sure you have ionide-vim installed correctly? ftdetect/fsharp.vim definitely should be doing the job:

autocmd BufNewFile,BufRead *.fs,*.fsi,*.fsx set filetype=fsharp
autocmd BufNewFile,BufRead *.fsproj         set filetype=fsharp_project

You could put that in your vimrc but you shouldn't have to...

cannorin commented 2 years ago

This should never happen as @tnishimura explained. We would need to look at your vimrc to see what is going on?

zetashift commented 2 years ago

So packer, the plugin manager I use for neovim, didn't copy the Ionide-vim files correctly, reinstalling Ionide-vim worked, but I had done that several times before. Sorry for bothering, but reinstalling worked!