From c3869bd8946d14fd14ffb4514c07ece07f7d421c Mon Sep 17 00:00:00 2001 From: XeroOl Date: Fri, 9 Feb 2024 11:14:09 -0600 Subject: [PATCH] feat(fennel-ls): allow utf-8 offsetEncoding The `fennel-ls` server can support `utf-8` offsetEncoding now, and it is preferred, as both neovim and fennel-ls use UTF-8 text encoding natively. --- lua/lspconfig/server_configurations/fennel_ls.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lua/lspconfig/server_configurations/fennel_ls.lua b/lua/lspconfig/server_configurations/fennel_ls.lua index f8030f9026..50a773991a 100644 --- a/lua/lspconfig/server_configurations/fennel_ls.lua +++ b/lua/lspconfig/server_configurations/fennel_ls.lua @@ -1,5 +1,8 @@ local util = require 'lspconfig.util' +local default_capabilities = vim.lsp.protocol.make_client_capabilities() +default_capabilities.offsetEncoding = { 'utf-8', 'utf-16' } + return { default_config = { cmd = { 'fennel-ls' }, @@ -8,6 +11,7 @@ return { return util.find_git_ancestor(dir) end, settings = {}, + capabilities = default_capabilities, }, docs = { description = [[