diff --git a/.editorconfig b/.editorconfig index 9a6cc75..b9de190 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,3 +1,9 @@ +root = true + +[*] +insert_final_newline = true +charset = utf-8 + [*.lua] indent_style = space indent_size = 2 diff --git a/.gitignore b/.gitignore index 2b83f71..cb08f89 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,7 @@ .venv/ doc/tags +*.log +build +debug venv/ CLAUDE.md diff --git a/lua/cp/init.lua b/lua/cp/init.lua index 676a2fe..075ee65 100644 --- a/lua/cp/init.lua +++ b/lua/cp/init.lua @@ -1,11 +1,11 @@ local M = {} +local cache = require('cp.cache') local config_module = require('cp.config') -local snippets = require('cp.snippets') -local scrape = require('cp.scrape') local logger = require('cp.log') local problem = require('cp.problem') -local cache = require('cp.cache') +local scrape = require('cp.scrape') +local snippets = require('cp.snippets') if not vim.fn.has('nvim-0.10.0') then vim.notify('[cp.nvim]: requires nvim-0.10.0+', vim.log.levels.ERROR) diff --git a/lua/cp/scrape.lua b/lua/cp/scrape.lua index b0373b9..56a9227 100644 --- a/lua/cp/scrape.lua +++ b/lua/cp/scrape.lua @@ -10,8 +10,8 @@ ---@field error? string local M = {} -local logger = require('cp.log') local cache = require('cp.cache') +local logger = require('cp.log') local function get_plugin_path() local plugin_path = debug.getinfo(1, 'S').source:sub(2) diff --git a/lua/cp/test.lua b/lua/cp/test.lua index fac8841..a1fdd85 100644 --- a/lua/cp/test.lua +++ b/lua/cp/test.lua @@ -21,8 +21,8 @@ ---@field saved_layout table? local M = {} -local logger = require('cp.log') local constants = require('cp.constants') +local logger = require('cp.log') ---@type TestPanelState local test_panel_state = { diff --git a/selene.toml b/selene.toml index 922273f..47b9138 100644 --- a/selene.toml +++ b/selene.toml @@ -1,3 +1 @@ std = "lua51+vim" - -exclude = ["spec"] diff --git a/.stylua.toml b/stylua.toml similarity index 82% rename from .stylua.toml rename to stylua.toml index a2b3447..01ded03 100644 --- a/.stylua.toml +++ b/stylua.toml @@ -4,3 +4,5 @@ indent_type = "Spaces" indent_width = 2 quote_style = "AutoPreferSingle" call_parentheses = "Always" +[sort_requires] +enabled = true diff --git a/spec/plugin_spec.lua b/tests/plugin_spec.lua similarity index 100% rename from spec/plugin_spec.lua rename to tests/plugin_spec.lua diff --git a/vim.toml b/vim.toml index 61f4a6e..df7e67e 100644 --- a/vim.toml +++ b/vim.toml @@ -1,6 +1,21 @@ [selene] -base = "lua52" +base = "lua51" name = "vim" [vim] any = true + +[jit] +any = true + +[assert] +any = true + +[describe] +any = true + +[it] +any = true + +[before_each.args] +any = true