Skip to content

Commit c13c825

Browse files
committed
chore: add luarc and stylua/editorconfig and reformat source files
1 parent 2e0c79c commit c13c825

File tree

8 files changed

+326
-295
lines changed

8 files changed

+326
-295
lines changed

.editorconfig

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 2
6+
trim_trailing_whitespace = true
7+
insert_final_newline = true

.luarc.json

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"$schema": "https://raw.githubusercontent.com/LuaLS/vscode-lua/master/setting/schema.json",
3+
"runtime": {
4+
"version": "LuaJIT"
5+
},
6+
"workspace": {
7+
"library": [
8+
"$VIMRUNTIME",
9+
"${3rd}/luv/library"
10+
],
11+
"checkThirdParty": false
12+
}
13+
}

.stylua.toml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
column_width = 120
2+
indent_type = "Spaces"
3+
indent_width = 2
4+
quote_style = "AutoPreferDouble"
5+
call_parentheses = "None"

after/plugin/cmp_vimtex.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
if cmp_vimtex_global == nil then
2-
require('cmp_vimtex').setup()
2+
require("cmp_vimtex").setup()
33
end

lua/cmp_vimtex/init.lua

+10-11
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,18 @@
11
local M = {}
22

3-
local group = vim.api.nvim_create_augroup('cmp_vimtex', {clear = true})
4-
vim.api.nvim_create_autocmd({"BufWinEnter",}, {
5-
pattern = '*.tex',
6-
group = group,
7-
callback = function()
8-
if cmp_vimtex_global.config.bibtex_parser.enabled == 1 then
9-
cmp_vimtex_global.start_parser(cmp_vimtex_global)
10-
end
11-
end,
3+
local group = vim.api.nvim_create_augroup("cmp_vimtex", { clear = true })
4+
vim.api.nvim_create_autocmd({ "BufWinEnter" }, {
5+
pattern = "*.tex",
6+
group = group,
7+
callback = function()
8+
if cmp_vimtex_global.config.bibtex_parser.enabled == 1 then
9+
cmp_vimtex_global.start_parser(cmp_vimtex_global)
10+
end
11+
end,
1212
})
1313

14-
1514
M.setup = function(options)
16-
require('cmp').register_source('vimtex', require('cmp_vimtex.source').new(options))
15+
require("cmp").register_source("vimtex", require("cmp_vimtex.source").new(options))
1716
end
1817

1918
return M

0 commit comments

Comments
 (0)