aboutsummaryrefslogtreecommitdiffstats
path: root/lsp/stylua.lua
diff options
context:
space:
mode:
authorBartłomiej Maryńczak <marynczak.bartlomiej@gmail.com>2025-09-14 23:44:05 +0200
committerGitHub <noreply@github.com>2025-09-14 14:44:05 -0700
commit345560dbc7a6acd91607d182093d512f7ff23096 (patch)
tree04f2fae9da549d3519d62ab7d398b41d6da0f3ec /lsp/stylua.lua
parentdocs: update configs.md (diff)
downloadnvim-lspconfig-345560dbc7a6acd91607d182093d512f7ff23096.tar
nvim-lspconfig-345560dbc7a6acd91607d182093d512f7ff23096.tar.gz
nvim-lspconfig-345560dbc7a6acd91607d182093d512f7ff23096.tar.bz2
nvim-lspconfig-345560dbc7a6acd91607d182093d512f7ff23096.tar.lz
nvim-lspconfig-345560dbc7a6acd91607d182093d512f7ff23096.tar.xz
nvim-lspconfig-345560dbc7a6acd91607d182093d512f7ff23096.tar.zst
nvim-lspconfig-345560dbc7a6acd91607d182093d512f7ff23096.zip
feat: StyLua Lua formatter #4073
Diffstat (limited to 'lsp/stylua.lua')
-rw-r--r--lsp/stylua.lua12
1 files changed, 12 insertions, 0 deletions
diff --git a/lsp/stylua.lua b/lsp/stylua.lua
new file mode 100644
index 00000000..79c12af5
--- /dev/null
+++ b/lsp/stylua.lua
@@ -0,0 +1,12 @@
+---@brief
+---
+--- https://github.com/JohnnyMorganz/StyLua
+---
+--- A deterministic code formatter for Lua 5.1, 5.2, 5.3, 5.4, LuaJIT, Luau and CfxLua/FiveM Lua
+
+---@type vim.lsp.Config
+return {
+ cmd = { 'stylua', '--lsp' },
+ filetypes = { 'lua' },
+ root_markers = { '.stylua.toml', 'stylua.toml' },
+}