diff --git a/lua/custom/mappings.lua b/lua/custom/mappings.lua index 0647703..b8e91a2 100644 --- a/lua/custom/mappings.lua +++ b/lua/custom/mappings.lua @@ -208,6 +208,9 @@ M.telescope = { ["fo"] = { " Telescope oldfiles ", "Find oldfiles" }, ["fz"] = { " Telescope current_buffer_fuzzy_find ", "Find in current buffer" }, + -- directory + ["cd"] = { " Telescope zoxide list", "telescope zoxide cd" }, + -- git ["cm"] = { " Telescope git_commits ", "Git commits" }, ["gt"] = { " Telescope git_status ", "Git status" }, diff --git a/lua/custom/plugins.lua b/lua/custom/plugins.lua index 0b738c4..b74ccaf 100644 --- a/lua/custom/plugins.lua +++ b/lua/custom/plugins.lua @@ -821,7 +821,17 @@ local plugins = { }, -- LSP configuration server = { - auto_attach = false, + on_attach = function(client, bufnr) + -- you can also put keymaps in here + end, + settings = { + -- rust-analyzer language server configuration + ["rust-analyzer"] = { + cargo = { + features = "all", + }, + }, + }, }, -- DAP configuration dap = { @@ -840,6 +850,42 @@ local plugins = { require("nvim-dap-virtual-text").setup() end, }, + { + "jvgrootveld/telescope-zoxide", + dependencies = "nvim-telescope/telescope.nvim", + config = function() + -- Useful for easily creating commands + local z_utils = require "telescope._extensions.zoxide.utils" + + require("telescope").setup { + -- (other Telescope configuration...) + extensions = { + zoxide = { + prompt_title = "[ Walking on the shoulders of TJ ]", + mappings = { + default = { + after_action = function(selection) + print("Update to (" .. selection.z_score .. ") " .. selection.path) + end, + }, + [""] = { + before_action = function(selection) + print "before C-s" + end, + action = function(selection) + vim.cmd.edit(selection.path) + end, + }, + -- Opens the selected entry in a new split + [""] = { action = z_utils.create_basic_command "split" }, + }, + }, + }, + } + require("telescope").load_extension "zoxide" + end, + }, + { "nanotee/zoxide.vim", lazy = false, enabled = false }, } return plugins diff --git a/spell/en.utf-8.add b/spell/en.utf-8.add index ffff2ce..ff89454 100644 --- a/spell/en.utf-8.add +++ b/spell/en.utf-8.add @@ -283,3 +283,8 @@ erstmal warmweißer WG SilverBullet +Forgejo +additional +scriptable +Autcrate +rustaceans