From a9b366459be38559bf3d0e489d29d3f6e77fadb6 Mon Sep 17 00:00:00 2001 From: servostar Date: Fri, 17 May 2024 10:33:26 +0200 Subject: [PATCH 1/3] added workflow and luacheckrc --- .gitea/workflows/luacheck.yml | 20 ++++++++++++++++++++ .luacheckrc | 4 ++++ 2 files changed, 24 insertions(+) create mode 100644 .gitea/workflows/luacheck.yml create mode 100644 .luacheckrc diff --git a/.gitea/workflows/luacheck.yml b/.gitea/workflows/luacheck.yml new file mode 100644 index 0000000..e558098 --- /dev/null +++ b/.gitea/workflows/luacheck.yml @@ -0,0 +1,20 @@ +name: Gitea Actions Demo +run-name: ${{ gitea.actor }} is performing luacheck +on: [push] + +jobs: + Explore-Gitea-Actions: + runs-on: ubuntu-latest + steps: + - run: echo "This job is now running on a ${{ runner.os }}" + - run: echo "The name of your branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}." + - name: Check out repository code + uses: actions/checkout@v3 + - run: echo "The ${{ gitea.repository }} repository has been cloned to the runner." + - name: Install dependencies + run: apt update && apt install neovim python3 lua5.4 + - run: echo "The workflow is now ready to test your code on the runner." + - name: Luacheck linter + uses: lunarmodules/luacheck@v1 + - run: echo "This job's status is ${{ job.status }}." + diff --git a/.luacheckrc b/.luacheckrc new file mode 100644 index 0000000..b69cbe1 --- /dev/null +++ b/.luacheckrc @@ -0,0 +1,4 @@ +color = true +globals = { + "vim" +} From d396f51ff3d60dbda5cdd1969a500215f9d60503 Mon Sep 17 00:00:00 2001 From: servostar Date: Fri, 17 May 2024 10:38:43 +0200 Subject: [PATCH 2/3] added -y option to apt --- .gitea/workflows/luacheck.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/luacheck.yml b/.gitea/workflows/luacheck.yml index e558098..8567754 100644 --- a/.gitea/workflows/luacheck.yml +++ b/.gitea/workflows/luacheck.yml @@ -12,7 +12,7 @@ jobs: uses: actions/checkout@v3 - run: echo "The ${{ gitea.repository }} repository has been cloned to the runner." - name: Install dependencies - run: apt update && apt install neovim python3 lua5.4 + run: apt update -y && apt install neovim python3 lua5.4 -y - run: echo "The workflow is now ready to test your code on the runner." - name: Luacheck linter uses: lunarmodules/luacheck@v1 From 62eb5491f3aaaebc181f3551415c594a206280f0 Mon Sep 17 00:00:00 2001 From: servostar Date: Fri, 17 May 2024 10:44:36 +0200 Subject: [PATCH 3/3] fixed luachecks --- lua/core/bootstrap.lua | 3 ++- lua/plugins/cmp.lua | 4 ++-- lua/plugins/lspconfig.lua | 4 ---- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/lua/core/bootstrap.lua b/lua/core/bootstrap.lua index c498b45..4654240 100644 --- a/lua/core/bootstrap.lua +++ b/lua/core/bootstrap.lua @@ -21,7 +21,8 @@ require("lazy").setup({ }, defaults = { -- By default, only LazyVim plugins will be lazy-loaded. Your custom plugins will load during startup. - -- If you know what you're doing, you can set this to `true` to have all your custom plugins lazy-loaded by default. + -- If you know what you're doing, you can set this to `true` + -- to have all your custom plugins lazy-loaded by default. lazy = false, -- It's recommended to leave version=false for now, since a lot the plugin that support versioning, -- have outdated releases, which may break your Neovim install. diff --git a/lua/plugins/cmp.lua b/lua/plugins/cmp.lua index 5789a27..a25e311 100644 --- a/lua/plugins/cmp.lua +++ b/lua/plugins/cmp.lua @@ -33,11 +33,11 @@ return { [""] = cmp.mapping.scroll_docs(4), [""] = cmp.mapping.complete(), [""] = cmp.mapping.abort(), - [""] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items. + [""] = cmp.mapping.confirm({ select = true }), [""] = cmp.mapping.confirm({ behavior = cmp.ConfirmBehavior.Replace, select = true, - }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items. + }), [""] = function(fallback) cmp.abort() fallback() diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index 015af98..4bf2a34 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -15,9 +15,6 @@ return { spacing = 4, source = "if_many", prefix = "●", - -- this will set set the prefix to a function that returns the diagnostics icon based on the severity - -- this only works on a recent 0.10.0 build. Will be set to "●" when not supported - -- prefix = "icons", }, severity_sort = true, float = { @@ -152,7 +149,6 @@ return { for server, server_opts in pairs(servers) do if server_opts then server_opts = server_opts == true and {} or server_opts - -- run manual setup if mason=false or if this is a server that cannot be installed with mason-lspconfig if server_opts.mason == false or not vim.tbl_contains(all_mslp_servers, server) then setup(server) else