From e2a01be4451365c4ede8cb73cfa3f0b539a219e8 Mon Sep 17 00:00:00 2001 From: terib0l <64969840+terib0l@users.noreply.github.com> Date: Tue, 21 Feb 2023 19:04:07 +0900 Subject: feat: add yara-language-server support (#2473) --- lua/lspconfig/server_configurations/yls.lua | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 lua/lspconfig/server_configurations/yls.lua (limited to 'lua') diff --git a/lua/lspconfig/server_configurations/yls.lua b/lua/lspconfig/server_configurations/yls.lua new file mode 100644 index 00000000..0fe15fb2 --- /dev/null +++ b/lua/lspconfig/server_configurations/yls.lua @@ -0,0 +1,28 @@ +local util = require 'lspconfig.util' + +local bin_name = 'yls' +local cmd = { bin_name, '-vv' } + +if vim.fn.has 'win32' == 1 then + cmd = { 'cmd.exe', '/C', bin_name, '-vv' } +end + +return { + default_config = { + cmd = cmd, + filetypes = { 'yar', 'yara' }, + root_dir = util.find_git_ancestor, + single_file_support = true, + }, + docs = { + description = [[ +https://pypi.org/project/yls-yara/ + +An YLS plugin adding YARA linting capabilities. + +This plugin runs yara.compile on every save, parses the errors, and returns list of diagnostic messages. + +Language Server: https://github.com/avast/yls +]], + }, +} -- cgit v1.2.3-70-g09d2