Skip to content

Commit

Permalink
chore(lua): consolidate lint and editor configs
Browse files Browse the repository at this point in the history
  • Loading branch information
silveiralexf committed Jul 29, 2024
1 parent 3827df2 commit ec5c3ae
Show file tree
Hide file tree
Showing 9 changed files with 113 additions and 17 deletions.
8 changes: 8 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
charset = utf-8
53 changes: 49 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
# Spelling, sops, personal tmux profiles, fzf binaries
.fzf/
.tmuxp/
*.dec
*.spl

# Hammerspoon Spoons
hammerspoon/Spoons/

# BFG
..bfg-report/

# LazyVim
./nvim/tt.*
./nvim/.tests
Expand All @@ -18,8 +25,46 @@ node_modules/
package.json
package-lock.json

# BFG
..bfg-report/
# Compiled Lua, Luarocks
luac.out
/luarocks.bat
/lua.bat
/lua_modules
/.luarocks
*.src.rock

# Hammerspoon Spoons
hammerspoon/Spoons/
# Object files
*.o
*.os
*.ko
*.obj
*.elf

# Precompiled Headers
*.gch
*.pch

# Libraries
*.lib
*.a
*.la
*.lo
*.def
*.exp

# Shared objects
*.dll
*.so
*.so.*
*.dylib
.DS_Store

# Executables and binaries in general
*.exe
*.out
*.app
*.i*86
*.x86_64
*.hex
*.zip
*.tar.gz
24 changes: 20 additions & 4 deletions .luacheckrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
std = "luajit"
globals = { "vim", "LazyVim" }
-- vim: ft=lua tw=80

std = 'luajit'
globals = { 'vim', 'LazyVim' }
cache = true
include_files = { "nvim/*.lua", "nvim/*/*.lua", "nvim/*/*/*.lua", "*.luacheckrc" }
exclude_files = { "src/luacheck/vendor" }
include_files = { 'nvim/*.lua', 'nvim/*/*.lua', 'nvim/*/*/*.lua', '*.luacheckrc' }
exclude_files = { 'src/luacheck/vendor' }
max_line_length = 150
max_comment_line_length = 200
files['wezterm/utils/backdrops.lua'] = { ignore = { '212' } }

-- Rerun tests only if their modification time changed
cache = true

-- Don't report unused self arguments of methods
self = false

-- ignore = {
-- '631', -- max_line_length
-- '212/_.*', -- unused argument, for vars with "_" prefix
-- }
8 changes: 2 additions & 6 deletions .luarc.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
{
"diagnostics.globals": [
"vim",
"args",
"hs",
"spoon"
]
"diagnostics.globals": ["vim", "args", "hs", "spoon"],
"workspace.checkThirdParty": false
}
File renamed without changes.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@


### [2024-07-29]
* [[3827df2]](https://github.com/silveiralexf/.dotfiles/commit/3827df247722b624f173bb5b068cc503e0ed0b25) chore: reorg config files and scripts (silveiralexf@gmail.com)


* [[67f41a9]](https://github.com/silveiralexf/.dotfiles/commit/67f41a9a2c13713ad8b5de55cb38e8c940076a6f) chore(terminal): replace kitty with wezterm (silveiralexf@gmail.com)


Expand Down
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024 silveiralexf@gmail.com

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
3 changes: 0 additions & 3 deletions nvim/stylua.toml

This file was deleted.

10 changes: 10 additions & 0 deletions stylua.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
indent_type = "Spaces"
indent_width = 2
column_width = 120
line_endings = "Unix"
quote_style = "AutoPreferSingle"
call_parentheses = "Always"
collapse_simple_statement = "Never"

[sort_requires]
enabled = true

0 comments on commit ec5c3ae

Please sign in to comment.