This is a source for nvim-cmp that autocompletes
hexpm packages and its versions. It's active only within a gleam.toml
file.
For packer:
use {
'steven-mathew/gleam-cmp',
requires = {
'nvim-lua/plenary.nvim'
}
}
For lazy.nvim:
{
"steven-mathew/gleam-cmp",
dependencies = { "nvim-lua/plenary.nvim" },
ft = "toml",
config = function()
require("gleam-cmp").setup {}
end
}
Please refer to the default settings below.
require("gleam-cmp.nvim").setup({
only_latest_version = false,
only_latest_stable_version = false,
})
Add the nvim-cmp source.
cmp.setup({
...,
sources = {
{ name = "gleam", keyword_length = 3 },
...,
},
})