diff --git a/lsp/gnls.lua b/lsp/gnls.lua new file mode 100644 index 0000000000..a44b8c83bb --- /dev/null +++ b/lsp/gnls.lua @@ -0,0 +1,19 @@ +---@brief +--- +--- https://github.com/microsoft/gnls +--- +--- Microsoft's language server for GN build files. +--- +--- Assuming there is a `gnls` script somewhere in your `$PATH`, containing +--- for example: +--- +--- ```shell +--- GNLS_SRC_DIR= +--- +--- exec node ${GNLS_SRC_DIR}/build/server.js $@ +--- ``` +return { + cmd = { 'gnls', '--stdio' }, + filetypes = { 'gn' }, + root_markers = { '.gn', '.git' }, +}