From 5a19f6b5fe6f88804a7a80649b6587ef30dcdc85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E6=99=93=E8=BE=89?= Date: Thu, 6 Jun 2024 19:30:17 +0800 Subject: [PATCH] feat(extras): add thrift lang support (#2804) This PR adds support for thriftls, the first line is because thrift is not among the neovim built-in file types. --------- Co-authored-by: Folke Lemaitre --- lua/lazyvim/plugins/extras/lang/thrift.lua | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 lua/lazyvim/plugins/extras/lang/thrift.lua diff --git a/lua/lazyvim/plugins/extras/lang/thrift.lua b/lua/lazyvim/plugins/extras/lang/thrift.lua new file mode 100644 index 00000000..d651f25a --- /dev/null +++ b/lua/lazyvim/plugins/extras/lang/thrift.lua @@ -0,0 +1,23 @@ +return { + recommended = { + ft = "thrift", + root = ".thrift", + }, + { + "nvim-treesitter", + optional = true, + opts = function(_, opts) + opts.ensure_installed = opts.ensure_installed or {} + vim.list_extend(opts.ensure_installed, { "thrift" }) + end, + }, + { + "nvim-lspconfig", + optional = true, + opts = { + servers = { + thriftls = {}, + }, + }, + }, +}