From ed47d386e6a1e02660da644e3e8bb961da18271e Mon Sep 17 00:00:00 2001 From: ray-x Date: Wed, 27 Jul 2022 02:37:26 +1000 Subject: [PATCH] chore selene setup --- lua/navigator/workspace.lua | 2 +- selene.toml | 5 ++++ vim.yml | 47 +++++++++++++++++++++++++++++++++++++ 3 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 vim.yml diff --git a/lua/navigator/workspace.lua b/lua/navigator/workspace.lua index fcfe68f..3a6704a 100644 --- a/lua/navigator/workspace.lua +++ b/lua/navigator/workspace.lua @@ -19,7 +19,7 @@ M.remove_workspace_folder = function() local folders = vim.lsp.buf.list_workspace_folders() if #folders > 1 then - select(folders, { prompt = 'select workspace to delete' }, function(workspace) + return select(folders, { prompt = 'select workspace to delete' }, function(workspace) vim.lsp.buf.remove_workspace_folder(workspace) end) end diff --git a/selene.toml b/selene.toml index 7f568bf..d59c685 100644 --- a/selene.toml +++ b/selene.toml @@ -1 +1,6 @@ std="lua52+vim" + +[rules] +global_usage = "allow" +multiple_statements = "allow" +unused_variable = "allow" diff --git a/vim.yml b/vim.yml new file mode 100644 index 0000000..4dada68 --- /dev/null +++ b/vim.yml @@ -0,0 +1,47 @@ +--- +base: lua52 +name: vim +globals: + _G: + property: new-fields + _NgConfigValues: + any: true + after_each: + args: + - type: function + assert.equals: + args: + - type: any + - type: any + - required: false + type: any + assert.is_not: + any: true + assert.same: + args: + - type: any + - type: any + assert.spy: + args: + - type: any + assert.stub: + args: + - type: any + assert.truthy: + args: + - type: any + before_each: + args: + - type: function + debug: + property: read-only + describe: + args: + - type: string + - type: function + it: + args: + - type: string + - type: function + vim: + any: true