Skip to content

Commit 31d0d45

Browse files
authored
devops: stylua and fix luarc (#3)
1 parent efcd924 commit 31d0d45

File tree

5 files changed

+23
-188
lines changed

5 files changed

+23
-188
lines changed

.luarc.json

Lines changed: 0 additions & 1 deletion
This file was deleted.

.luarc.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"diagnostics": {
3+
"globals": [
4+
"dofile"
5+
]
6+
},
7+
"workspace": {
8+
"library": [
9+
"$VIMRUNTIME",
10+
"deps/mini.nvim"
11+
]
12+
}
13+
}

.stylua.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
line_endings = "Unix"
2+
indent_type = "Tabs"
3+
indent_width = 2
4+
quote_style = "AutoPreferDouble"
5+
call_parentheses = "Always"
6+
collapse_simple_statement = "Never"

flake.lock

Lines changed: 1 addition & 163 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,39 +2,19 @@
22
inputs = {
33
nixpkgs.url = "github:NixOS/nixpkgs";
44
flake-utils.url = "github:numtide/flake-utils";
5-
gen-luarc.url = "github:mrcjkb/nix-gen-luarc-json";
65
};
76
outputs =
8-
{
9-
nixpkgs,
10-
flake-utils,
11-
gen-luarc,
12-
...
13-
}:
7+
{ nixpkgs, flake-utils, ... }:
148
flake-utils.lib.eachDefaultSystem (
159
system:
1610
let
17-
pkgs = import nixpkgs {
18-
inherit system;
19-
overlays = [
20-
gen-luarc.overlays.default
21-
];
22-
};
23-
luarc = pkgs.mk-luarc-json {
24-
plugins = with pkgs.vimPlugins; [
25-
mini-nvim
26-
];
27-
};
11+
pkgs = import nixpkgs { inherit system; };
2812
in
2913
{
3014
devShells.default = pkgs.mkShell {
3115
packages = with pkgs; [
3216
lua-language-server
3317
];
34-
shellHook = # bash
35-
''
36-
ln -fs ${luarc} .luarc.json
37-
'';
3818
};
3919
}
4020
);

lua/zen/init.lua

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,8 +250,7 @@ local function setup(options)
250250
for _, integration in pairs(opts[position]) do
251251
---@diagnostic disable-next-line: undefined-field
252252
if type(integration) == "table" and integration.filetype == filetype then
253-
local new_width =
254-
math.max(opts[position].min_width, math.floor((vim.o.columns - opts.main.width) / 2))
253+
local new_width = math.max(opts[position].min_width, math.floor((vim.o.columns - opts.main.width) / 2))
255254
vim.api.nvim_win_set_width(buf_info[1].windows[1], new_width)
256255
return
257256
end

0 commit comments

Comments
 (0)