System info
uname -a >> Linux un150 5.8.0-45-generic #51~20.04.1-Ubuntu
vim --version >> VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Mar 23 2021 15:25:21)
daml version >> 1.11.1 (default SDK version for new projects)
Fixed!
$ cd ~/.vim
$ rm -rf *
# Follow the instructions at https://github.com/junegunn/vim-plug
# Ensure you use ~/.vim/autoload as the $PLUGIN directory
# Follow the instructions at https://github.com/neoclide/coc.nvim
" Use release branch (recommend)
Plug 'neoclide/coc.nvim', {'branch': 'release'}
# Open a *.daml file using Vim
$ vim ~/Projects/daml/trash_app/daml/Main.daml
# Use Vim to install the 'neoclide' plugin
# Install the required extensions
:CocInstall coc-json coc-tsserver
# Configure language server in coc-settings.json by
# Use Vim to edit the 'coc-settings.json' file
:CocConfig
# Use the following:
{
"languageserver": {
"daml": {
"command": "daml",
"args": [
"ide"
],
"rootPatterns": [
"daml.yaml"
],
"filetypes": [
"daml"
],
"initializationOptions": {}
}
}
}
# The actual file 'coc-settings.json' is located in ~/.vim
$ quid ~/.vim $ ls coc-settings.json
coc-settings.json
# Edit ~/.vimrc to include
au BufRead,BufNewFile *.daml set filetype=daml
# There is no need for ':set syntax=daml'
# Use Vim to open the previous *.daml file
# Enjoy the power and the awful Pink
TODO:
Summary
Read GitHub - microsoft/language-server-protocol: Defines a common protocol for language servers.</titl
Read GitHub - mattn/vim-lsp-settings: Auto configurations for Language Server for vim-lsp
Add in additional languages, ie Erlang & Haskell Native