diff options
| author | Ariel D'Alessandro <ariel.dalessandro@auto1.com> | 2022-05-24 11:53:49 +0200 |
|---|---|---|
| committer | Ariel D'Alessandro <ariel.dalessandro@auto1.com> | 2022-05-24 11:53:49 +0200 |
| commit | badc26c307142216ff4c6d905014e501882bf029 (patch) | |
| tree | 1dd5d244fe18f7c25ad197b4b09f54dbe820a413 /lua/alpha | |
| parent | 4946cee5c1c100d10e0d04d107d5e67b7eb1e99f (diff) | |
| download | nvim-conf-badc26c307142216ff4c6d905014e501882bf029.tar.gz nvim-conf-badc26c307142216ff4c6d905014e501882bf029.zip | |
Add lazygit, refactor code actions, fix lsp command
Diffstat (limited to 'lua/alpha')
| -rw-r--r-- | lua/alpha/lsp.lua | 2 | ||||
| -rw-r--r-- | lua/alpha/php_code_actions.lua | 3 | ||||
| -rw-r--r-- | lua/alpha/plugins.lua | 2 | ||||
| -rw-r--r-- | lua/alpha/refactor.lua | 4 |
4 files changed, 8 insertions, 3 deletions
diff --git a/lua/alpha/lsp.lua b/lua/alpha/lsp.lua index 8d48993..95b7148 100644 --- a/lua/alpha/lsp.lua +++ b/lua/alpha/lsp.lua @@ -24,13 +24,13 @@ local function on_attach(client) vim.keymap.set("n", "<leader>vf", vim.lsp.buf.formatting, { buffer = 0 }) vim.keymap.set("n", "<leader>vn", vim.diagnostic.goto_next, { buffer = 0 }) vim.keymap.set("n", "<leader>vp", vim.diagnostic.goto_prev, { buffer = 0 }) + vim.keymap.set("n", "<leader>vca", vim.lsp.buf.code_action, { buffer = 0 }) vim.keymap.set("i", "<c-k>", vim.lsp.buf.signature_help, { buffer = 0 }) vim.keymap.set("n", "<leader>vo", ":LspRestart<cr>", { noremap = true }) telescope_mapper("gr", "lsp_references", nil, true) telescope_mapper("<leader>pv", "find_symbol", nil, true) telescope_mapper("<leader>pd", "lsp_document_symbols", nil, true) - telescope_mapper("<leader>vca", "lsp_code_actions", nil, true) vim.bo.omnifunc = "v:lua.vim.lsp.omnifunc" diff --git a/lua/alpha/php_code_actions.lua b/lua/alpha/php_code_actions.lua index 998fcb5..5bca3c3 100644 --- a/lua/alpha/php_code_actions.lua +++ b/lua/alpha/php_code_actions.lua @@ -38,6 +38,9 @@ local php_setter_getter_actions = { generator = { fn = function(context) local cursor_node = utils.get_master_node() + if cursor_node == nil then + return + end if cursor_node.type(cursor_node) ~= "property_declaration" then return end diff --git a/lua/alpha/plugins.lua b/lua/alpha/plugins.lua index 446c1d6..7b9f4c4 100644 --- a/lua/alpha/plugins.lua +++ b/lua/alpha/plugins.lua @@ -97,6 +97,8 @@ return require("packer").startup(function(use) use("github/copilot.vim") + use "kdheepak/lazygit.nvim" + use({ "nvim-telescope/telescope.nvim", requires = { diff --git a/lua/alpha/refactor.lua b/lua/alpha/refactor.lua index 418a078..8474b87 100644 --- a/lua/alpha/refactor.lua +++ b/lua/alpha/refactor.lua @@ -243,7 +243,7 @@ M.new_property = function () vim.api.nvim_win_set_cursor(0, {row, column}) end -vim.keymap.set("n", "<leader>rs", M.setter_getter, {}) -vim.keymap.set("n", "<leader>rn", M.new_property, {}) +-- vim.keymap.set("n", "<leader>rs", M.setter_getter, {}) +-- vim.keymap.set("n", "<leader>rn", M.new_property, {}) return M |