NeoVim is not recognising Solidity filetypes (which end with the extension .sol
).
When editing a .sol
file typing:
:set filetype?
generates a filetype=
(e.g. blank). This is in contrast to html, md, php, etc files which all produce the expected result.
My initial reaction was that the Solidity programming language was not known to NeoVim (it isn't exactly C...). However typing:
:echo getcompletion('sol', 'filetype')
produces ['solhint', 'solidity']
. NeoVim should therefore recognise the language.
I can set this manually with:
:set filetype=solidity
(which also means that :ALEInfo
recognises the file) however this is forgotten when I restart NeoVim.
I appreciate that it is possible to configure NeoVim to recognise unknown filetypes; but I'd rather have it work as it is meant to, than add workarounds.
Is this a NeoVim bug, am I doing something wrong or is my configuration flawed?
I am experiencing this issue using NVIM 0.3.8 on Ubuntu 18.04 and NVIM 0.4.3 on Ubuntu 19.10.
NB - I also get the blank filetype=
using VIM 8.1.1401 on Ubuntu 19.10, but interestingly :echo getcompletion('sol', 'filetype')
returns []
, i.e. nothing.