DAML-on-vim

If you recently switched to neovim 5.0 and its builtin language server client, just add this to your init.lua:

local util = require 'lspconfig/util'

configs.daml = {
  default_config = {
    cmd = { 'daml', 'ide' },
    filetypes = { 'daml' },
    root_dir = util.root_pattern('daml.yaml'),
  },

  docs = {
    description = [[ https://daml.com ]],
    default_config = {
      root_dir = [[root_pattern("daml.yaml")]],
    },
  },
}

This requires that the neovim/nvim-lspconfig plugin is installed.

I opened a PR to include this in the neovim/nvim-lspconfig plugin, such that in a future version you will simply be able to add

require'lspconfig'.daml.setup{}
2 Likes