diff --git a/dotfiles/neovim/init.lua b/dotfiles/neovim/init.lua index c0333ec..faf7622 100644 --- a/dotfiles/neovim/init.lua +++ b/dotfiles/neovim/init.lua @@ -666,6 +666,7 @@ lspconfig.julials.setup { ]] } } -- SATySFi +require 'lspconfig.server_configurations.satysfi_ls' lspconfig.satysfi_ls.setup { on_attach = on_attach, capabilities = capabilities, diff --git a/dotfiles/neovim/lua/lspconfig/server_configurations/satysfi_ls.lua b/dotfiles/neovim/lua/lspconfig/server_configurations/satysfi_ls.lua index 1301c06..8659f2e 100644 --- a/dotfiles/neovim/lua/lspconfig/server_configurations/satysfi_ls.lua +++ b/dotfiles/neovim/lua/lspconfig/server_configurations/satysfi_ls.lua @@ -1,21 +1,20 @@ -- https://zenn.dev/monaqa/articles/2021-12-10-satysfi-language-server -local util = require 'lspconfig.util' +local configs = require 'lspconfig.configs' -return { - default_config = { - cmd = { 'satysfi-language-server' }, - filetypes = { 'satysfi' }, - root_dir = util.root_pattern('.git'), - single_file_support = true, - }, - docs = { - description = [[ - https://github.com/monaqa/satysfi-language-server - Language server for SATySFi. - ]], +configs.satysfi_ls = { default_config = { - root_dir = [[root_pattern(".git")]], + cmd = { 'satysfi-language-server' }, + filetypes = { 'satysfi' }, + root_dir = vim.fs.root(0, ".git"), + single_file_support = true, + }, + docs = { + description = [[ + https://github.com/monaqa/satysfi-language-server + Language server for SATySFi. + ]], + default_config = { + root_dir = [[root_pattern(".git")]], + }, }, - }, } -