From c7d7b4204eab8a020bba2bd849959e4817001e0e Mon Sep 17 00:00:00 2001 From: qwjyh Date: Fri, 7 Oct 2022 04:03:59 +0900 Subject: [PATCH] (WIP) add nvim satysfi configs (need more config for lsp-config) --- dotfiles/neovim/init.lua | 7 +++++++ .../server_configuration/satysfi-ls.lua | 20 +++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 dotfiles/neovim/lua/lspconfig/server_configuration/satysfi-ls.lua diff --git a/dotfiles/neovim/init.lua b/dotfiles/neovim/init.lua index d7bdd8e..7097cb2 100644 --- a/dotfiles/neovim/init.lua +++ b/dotfiles/neovim/init.lua @@ -138,3 +138,10 @@ cmp.setup({ vim.api.nvim_set_keymap('n', '', "lua require('fzf-lua').files()", { noremap = true, silent = true }) + + +----------------------------------------------------------- +-- satysfi language server +require('lspconfig')['satysfi-ls'].setup{ + autostart = true +} diff --git a/dotfiles/neovim/lua/lspconfig/server_configuration/satysfi-ls.lua b/dotfiles/neovim/lua/lspconfig/server_configuration/satysfi-ls.lua new file mode 100644 index 0000000..78e30f7 --- /dev/null +++ b/dotfiles/neovim/lua/lspconfig/server_configuration/satysfi-ls.lua @@ -0,0 +1,20 @@ +# https://zenn.dev/monaqa/articles/2021-12-10-satysfi-language-server +local util = require 'lspconfig.util' + +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. + ]], + default_config = { + root_dir = [[root_pattern(".git")]], + }, + }, +}