Skip to content

Neovim

Floe works with Neovim’s built-in LSP client. No plugins required beyond a standard Neovim setup.

Add to your init.lua:

-- Register .fl files
vim.filetype.add({ extension = { fl = "floe" } })
-- Start the LSP
vim.api.nvim_create_autocmd("FileType", {
pattern = "floe",
callback = function()
vim.lsp.start({
name = "floe",
cmd = { "floe", "lsp" },
root_dir = vim.fs.dirname(
vim.fs.find({ ".git" }, { upward = true })[1]
),
})
end,
})
local lspconfig = require("lspconfig")
local configs = require("lspconfig.configs")
if not configs.floe then
configs.floe = {
default_config = {
cmd = { "floe", "lsp" },
filetypes = { "floe" },
root_dir = lspconfig.util.root_pattern(".git"),
},
}
end
lspconfig.floe.setup({})

Copy the included Vim syntax file:

Terminal window
cp editors/neovim/syntax/floe.vim ~/.config/nvim/syntax/

All LSP features work out of the box:

  • Diagnostics - inline errors and warnings
  • Hover (K) - type signatures and docs
  • Completions (<C-x><C-o>) - symbols, keywords, pipe-aware autocomplete
  • Go to Definition (gd)
  • Find References (gr)
  • Document Symbols - works with Telescope, fzf, etc.
  • Quick Fix - auto-insert return types on exported functions
  • floe in your $PATH (cargo install --path . from the repo)
  • Neovim 0.8+