From 322e8f8069aa38a3b3aca88d005a44c186f6d030 Mon Sep 17 00:00:00 2001 From: MasterGordon Date: Mon, 11 Nov 2024 08:50:43 +0100 Subject: [PATCH] fixed picker and php formatter --- lazy-lock.json | 14 +++++++------- lua/plugins/formatter.lua | 32 ++++++++++++++++++++++---------- lua/plugins/telescope.lua | 10 +++++----- 3 files changed, 34 insertions(+), 22 deletions(-) diff --git a/lazy-lock.json b/lazy-lock.json index 5e43865..831127a 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -14,15 +14,15 @@ "cspell.nvim": { "branch": "main", "commit": "2c29bf573292c8f5053383d1be4ab908f4ecfc47" }, "editorconfig-vim": { "branch": "master", "commit": "ba2ce027c5b0e523e658d24657ce3ae3306c9fe0" }, "fidget.nvim": { "branch": "main", "commit": "d855eed8a06531a7e8fd0684889b2943f373c469" }, - "formatter.nvim": { "branch": "master", "commit": "04547bdfe89035731a2815a3875b87f77d43e36d" }, - "gitsigns.nvim": { "branch": "main", "commit": "863903631e676b33e8be2acb17512fdc1b80b4fb" }, + "formatter.nvim": { "branch": "master", "commit": "db71fdb31cee8ae33573b5cf1910e477360678b2" }, + "gitsigns.nvim": { "branch": "main", "commit": "ee7634ab4f0a6606438fe13e16cbf2065589a5ed" }, "heirline.nvim": { "branch": "master", "commit": "7a79753c1a42c3f52e89a6c42429e7f871e560cd" }, - "lazy.nvim": { "branch": "main", "commit": "1159bdccd8910a0fd0914b24d6c3d186689023d9" }, + "lazy.nvim": { "branch": "main", "commit": "cf8ecc2c5e4332760431a33534240b0cbc6680ab" }, "lightspeed.nvim": { "branch": "main", "commit": "fcc72d8a4d5f4ebba62d8a3a0660f88f1b5c3b05" }, "lsp_signature.nvim": { "branch": "master", "commit": "fc38521ea4d9ec8dbd4c2819ba8126cea743943b" }, "lspkind-nvim": { "branch": "master", "commit": "59c3f419af48a2ffb2320cea85e44e5a95f71664" }, "markview.nvim": { "branch": "main", "commit": "67b69cdaf9055bebac3682a070d7e5c8eecba29c" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "25c11854aa25558ee6c03432edfa0df0217324be" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "7446f47b3dfb7df801f31a6f6783c2ad119a6935" }, "mason-null-ls.nvim": { "branch": "main", "commit": "de19726de7260c68d94691afb057fa73d3cc53e7" }, "mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" }, "mkdir.nvim": { "branch": "main", "commit": "c55d1dee4f099528a1853b28bb28caa802eba217" }, @@ -34,13 +34,13 @@ "none-ls.nvim": { "branch": "main", "commit": "dcc8cd4efdcb29275681a3c95786a816330dbca6" }, "nui.nvim": { "branch": "main", "commit": "b58e2bfda5cea347c9d58b7f11cf3012c7b3953f" }, "nvim-autopairs": { "branch": "master", "commit": "ee297f215e95a60b01fde33275cc3c820eddeebe" }, - "nvim-cmp": { "branch": "main", "commit": "ae644feb7b67bf1ce4260c231d1d4300b19c6f30" }, + "nvim-cmp": { "branch": "main", "commit": "29fb4854573355792df9e156cb779f0d31308796" }, "nvim-colorizer.lua": { "branch": "master", "commit": "a065833f35a3a7cc3ef137ac88b5381da2ba302e" }, "nvim-dap": { "branch": "master", "commit": "7ff6936010b7222fea2caea0f67ed77f1b7c60dd" }, "nvim-dap-ui": { "branch": "master", "commit": "ffa89839f97bad360e78428d5c740fdad9a0ff02" }, - "nvim-lspconfig": { "branch": "master", "commit": "541f3a2781de481bb84883889e4d9f0904250a56" }, + "nvim-lspconfig": { "branch": "master", "commit": "edd9591199d1c78c0cb20514231f7f936f9412a2" }, "nvim-nio": { "branch": "master", "commit": "a428f309119086dc78dd4b19306d2d67be884eee" }, - "nvim-treesitter": { "branch": "master", "commit": "03452942dfbd998701d4123ccad2090e1bc7e9f1" }, + "nvim-treesitter": { "branch": "master", "commit": "9210b9a4fa106247333495e19c843710f4d62102" }, "nvim-ts-autotag": { "branch": "main", "commit": "e239a560f338be31337e7abc3ee42515daf23f5e" }, "nvim-ts-context-commentstring": { "branch": "main", "commit": "9c74db656c3d0b1c4392fc89a016b1910539e7c0" }, "nvim-vtsls": { "branch": "main", "commit": "45c6dfea9f83a126e9bfc5dd63430562b3f8af16" }, diff --git a/lua/plugins/formatter.lua b/lua/plugins/formatter.lua index 5b0cd1f..f204041 100644 --- a/lua/plugins/formatter.lua +++ b/lua/plugins/formatter.lua @@ -91,6 +91,18 @@ require("formatter").setup( stdin = true } end + }, + php = { + function() + return { + exe = "vendor/bin/php-cs-fixer", + args = { + "fix" + }, + stdin = false, + ignore_exitcode = true + } + end } } } @@ -100,20 +112,20 @@ vim.api.nvim_exec( [[ augroup FormatAutogroup autocmd! - autocmd BufWritePost *.cs,*.h,*.cpp,*.rs,*.lua,*.tsx,*.ts,*.js,*.jsx,*.json,*.jsonc,*.swift,*.xml,*.sln,*.csproj,*.ml FormatWrite + autocmd BufWritePost *.cs,*.h,*.cpp,*.rs,*.lua,*.tsx,*.ts,*.js,*.jsx,*.json,*.jsonc,*.swift,*.xml,*.sln,*.csproj,*.ml,*.php FormatWrite augroup END ]], true ) -local formatGrp = vim.api.nvim_create_augroup("Format", {clear = true}) -vim.api.nvim_create_autocmd( - "BufWritePre", - { - pattern = "*.php", - command = "lua vim.lsp.buf.format { async = false }", - group = formatGrp - } -) +-- local formatGrp = vim.api.nvim_create_augroup("Format", {clear = true}) +-- vim.api.nvim_create_autocmd( +-- "BufWritePre", +-- { +-- pattern = "*.php", +-- command = "lua vim.lsp.buf.format { async = false }", +-- group = formatGrp +-- } +-- ) -- local function organize_imports() -- local params = { diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua index b25b0ac..2e23941 100644 --- a/lua/plugins/telescope.lua +++ b/lua/plugins/telescope.lua @@ -3,11 +3,11 @@ local selectX = function(n) local a = require("telescope.actions") local s = require("telescope.actions.state") local picker_name = s.get_current_picker(bufnr).prompt_title - if not quick_prompts[picker_name] then - -- Disable quick prompts to not press by accident - -- TODO: Still type the number - return - end + -- if not quick_prompts[picker_name] then + -- -- Disable quick prompts to not press by accident + -- -- TODO: Still type the number + -- return + -- end a.move_to_top(bufnr) for _ = 1, n - 1 do a.move_selection_next(bufnr)