Skip to content

Commit

Permalink
chore(lua): add vscode and luacheck setup
Browse files Browse the repository at this point in the history
  • Loading branch information
dtfiedler committed Nov 4, 2024
1 parent 33d371f commit 794da1b
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 6 deletions.
9 changes: 9 additions & 0 deletions .luacheckrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
allow_defined = true
exclude_files = {
"src/crypto",
}
globals = {
"Handlers",
"ao",
}
max_line_length = 185
7 changes: 7 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"recommendations": [
"JohnnyMorganz.stylua",
"sumneko.lua",
"esbenp.prettier-vscode"
]
}
27 changes: 21 additions & 6 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,25 +1,40 @@
{
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"editor.formatOnPaste": true,
"editor.formatOnSaveMode": "file",
"[mjs, js]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"editor.formatOnPaste": true,
"editor.formatOnSaveMode": "file"
},
"prettier.configPath": ".prettierrc",
"prettier.prettierPath": "./node_modules/prettier/index.cjs",
"[typescript]": {
"editor.formatOnSave": true
},
"[markdown]": {
"editor.formatOnSave": true
"editor.formatOnSave": true,
"editor.formatOnSaveMode": "file"
},
"search.exclude": {
"**/node_modules": true,
"**/lib": true,
"**/dist": true,
"**/coverage": true
},
"Lua.codeLens.enable": true,
"Lua.workspace.library": ["${workspaceFolderBasename}/**"],
"Lua.completion.callSnippet": "Both",
"Lua.signatureHelp.enable": true,
"Lua.workspace.checkThirdParty": true,
"Lua.diagnostics.enable": true,
"Lua.diagnostics.disable": ["lowercase-global", "undefined-global"],
"Lua.format.defaultConfig": {
"indent_style": "space",
"indent_size": "2"
},
"[lua]": {
"editor.defaultFormatter": "JohnnyMorganz.stylua",
"editor.formatOnSave": true
"editor.formatOnSave": true,
"editor.formatOnPaste": true,
"editor.formatOnSaveMode": "file"
}
}

0 comments on commit 794da1b

Please sign in to comment.