diff --git a/nvim/.config/nvim/lazy-lock.json b/nvim/.config/nvim/lazy-lock.json index 98190bd..336a403 100644 --- a/nvim/.config/nvim/lazy-lock.json +++ b/nvim/.config/nvim/lazy-lock.json @@ -1,32 +1,35 @@ { "FixCursorHold.nvim": { "branch": "master", "commit": "1900f89dc17c603eec29960f57c00bd9ae696495" }, - "LuaSnip": { "branch": "master", "commit": "5a1e39223db9a0498024a77b8441169d260c8c25" }, - "blink.cmp": { "branch": "main", "commit": "451168851e8e2466bc97ee3e026c3dcb9141ce07" }, - "fidget.nvim": { "branch": "main", "commit": "7fa433a83118a70fe24c1ce88d5f0bd3453c0970" }, + "LuaSnip": { "branch": "master", "commit": "642b0c595e11608b4c18219e93b88d7637af27bc" }, + "blink.cmp": { "branch": "main", "commit": "78336bc89ee5365633bcf754d93df01678b5c08f" }, + "diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" }, + "fidget.nvim": { "branch": "main", "commit": "889e2e96edef4e144965571d46f7a77bcc4d0ddf" }, "fyler.nvim": { "branch": "stable", "commit": "bb8b9f30c652c948d35211958b0deec3496bcc08" }, - "gitsigns.nvim": { "branch": "main", "commit": "7c4faa3540d0781a28588cafbd4dd187a28ac6e3" }, + "gitsigns.nvim": { "branch": "main", "commit": "6d808f99bd63303646794406e270bd553ad7792e" }, "indent-blankline.nvim": { "branch": "master", "commit": "d28a3f70721c79e3c5f6693057ae929f3d9c0a03" }, "lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" }, "mason-nvim-dap.nvim": { "branch": "main", "commit": "9a10e096703966335bd5c46c8c875d5b0690dade" }, "mason-tool-installer.nvim": { "branch": "main", "commit": "443f1ef8b5e6bf47045cb2217b6f748a223cf7dc" }, - "mason.nvim": { "branch": "main", "commit": "44d1e90e1f66e077268191e3ee9d2ac97cc18e65" }, - "mini.icons": { "branch": "main", "commit": "5b9076dae1bfbe47ba4a14bc8b967cde0ab5d77e" }, - "mini.nvim": { "branch": "main", "commit": "59f09943573c5348ca6c88393fa09ce3b66a7818" }, - "neotest": { "branch": "master", "commit": "deadfb1af5ce458742671ad3a013acb9a6b41178" }, - "neotest-vstest": { "branch": "main", "commit": "78de83604052c5ff6a6bddf579f4f646ee8254c7" }, - "nvim": { "branch": "main", "commit": "a7788416689dbefea659d9e9415c87926b0ba5d8" }, + "mason.nvim": { "branch": "main", "commit": "cb8445f8ce85d957416c106b780efd51c6298f89" }, + "mini.icons": { "branch": "main", "commit": "bac6317300e205335df425296570d84322730067" }, + "mini.nvim": { "branch": "main", "commit": "be81509b7160aa02264a59789164a2e1c4a6750a" }, + "neotest": { "branch": "master", "commit": "fd0b7986dd0ae04e38ec7dc0c78a432e3820839c" }, + "neotest-vstest": { "branch": "main", "commit": "8588c3c988c7ed49879dddf937b42681cfa7ce30" }, + "nvim": { "branch": "main", "commit": "426dbebe06b5c69fd846ceb17b42e12f890aedf1" }, "nvim-autopairs": { "branch": "master", "commit": "59bce2eef357189c3305e25bc6dd2d138c1683f5" }, - "nvim-dap": { "branch": "master", "commit": "a9d8cb68ee7184111dc66156c4a2ebabfbe01bc5" }, + "nvim-dap": { "branch": "master", "commit": "45a69eba683a2c448dd9ecfc4de89511f0646b5f" }, "nvim-dap-cs": { "branch": "main", "commit": "16e5debe8cb7fb73c8799d20969ee00883586602" }, "nvim-dap-go": { "branch": "main", "commit": "b4421153ead5d726603b02743ea40cf26a51ed5f" }, - "nvim-dap-ui": { "branch": "master", "commit": "cf91d5e2d07c72903d052f5207511bf7ecdb7122" }, - "nvim-lspconfig": { "branch": "master", "commit": "841c6d4139aedb8a3f2baf30cef5327371385b93" }, + "nvim-dap-ui": { "branch": "master", "commit": "1a66cabaa4a4da0be107d5eda6d57242f0fe7e49" }, + "nvim-lspconfig": { "branch": "master", "commit": "6419b36f50c42420cbbf1d3ffba573094cf414c8" }, "nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" }, - "nvim-treesitter": { "branch": "main", "commit": "0e0db770f2a3691fae478798342f4ac431accefd" }, - "nvim-treesitter-context": { "branch": "master", "commit": "adf4b6b0420b7be6c717ef0ac7993183d6c201b1" }, - "plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" }, - "roslyn.nvim": { "branch": "main", "commit": "ff43201090361b8936e008a006473b59ef2c0ca6" }, - "telescope.nvim": { "branch": "master", "commit": "5255aa27c422de944791318024167ad5d40aad20" }, + "nvim-treesitter": { "branch": "main", "commit": "4916d6592ede8c07973490d9322f187e07dfefac" }, + "nvim-treesitter-context": { "branch": "master", "commit": "b0c45cefe2c8f7b55fc46f34e563bc428ef99636" }, + "nvim-web-devicons": { "branch": "master", "commit": "4fc505ac7bd7692824a142e96e5f529c133862f8" }, + "plenary.nvim": { "branch": "master", "commit": "74b06c6c75e4eeb3108ec01852001636d85a932b" }, + "telescope-fzf-native.nvim": { "branch": "main", "commit": "6fea601bd2b694c6f2ae08a6c6fab14930c60e2c" }, + "telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" }, + "telescope.nvim": { "branch": "master", "commit": "506338434fec5ad19cb1f8d45bf92d66c4917393" }, "trouble.nvim": { "branch": "main", "commit": "bd67efe408d4816e25e8491cc5ad4088e708a69a" }, "undotree": { "branch": "master", "commit": "6fa6b57cda8459e1e4b2ca34df702f55242f4e4d" }, "vim-fugitive": { "branch": "master", "commit": "3b753cf8c6a4dcde6edee8827d464ba9b8c4a6f0" }, diff --git a/nvim/.config/nvim/lua/config/lazy.lua b/nvim/.config/nvim/lua/config/lazy.lua index 3149544..5a3bd02 100644 --- a/nvim/.config/nvim/lua/config/lazy.lua +++ b/nvim/.config/nvim/lua/config/lazy.lua @@ -23,8 +23,5 @@ require("lazy").setup({ spec = { { import = "plugins" }, }, - checker = { - notify = false, - enabled = true - }, + checker = { enabled = false }, }) diff --git a/nvim/.config/nvim/lua/dliaskos/remap.lua b/nvim/.config/nvim/lua/dliaskos/remap.lua index 1900d8d..ac704ea 100644 --- a/nvim/.config/nvim/lua/dliaskos/remap.lua +++ b/nvim/.config/nvim/lua/dliaskos/remap.lua @@ -1,5 +1,7 @@ vim.keymap.set("n", "[q", vim.cmd.cprev, { desc = "Previous Quickfix" }) vim.keymap.set("n", "]q", vim.cmd.cnext, { desc = "Next Quickfix" }) +vim.keymap.set("n", "[l", vim.cmd.cprev, { desc = "Previous Location" }) +vim.keymap.set("n", "]l", vim.cmd.cnext, { desc = "Next Location" }) vim.keymap.set("n", "", "zz") vim.keymap.set("n", "", "zz") @@ -9,7 +11,10 @@ vim.keymap.set('n', '', 'j', { desc = 'Move to below split' }) vim.keymap.set('n', '', 'k', { desc = 'Move to above split' }) vim.keymap.set('n', '', 'l', { desc = 'Move to right split' }) +-- Quick global marks: Alt to jump +for _, letter in ipairs({ 'u', 'i', 'o', 'p' }) do + local upper = string.upper(letter) + vim.keymap.set('n', '', '`' .. upper, { desc = 'Jump to mark ' .. upper }) +end + vim.keymap.set('n', '', 'nohlsearch') -vim.keymap.set({ "n", "v" }, "y", [["+y]], { desc = 'Yank to clipboard' }) -vim.keymap.set("n", "Y", [["+Y]], { desc = 'Yank line to clipboard' }) -vim.keymap.set('n', "p", [["+p]], { desc = 'Paste from clipboard' }) \ No newline at end of file diff --git a/nvim/.config/nvim/lua/dliaskos/set.lua b/nvim/.config/nvim/lua/dliaskos/set.lua index f696b30..91c92f0 100644 --- a/nvim/.config/nvim/lua/dliaskos/set.lua +++ b/nvim/.config/nvim/lua/dliaskos/set.lua @@ -1,3 +1,6 @@ +vim.g.loaded_netrw = 1 +vim.g.loaded_netrwPlugin = 1 + vim.opt.nu = true vim.opt.relativenumber = true diff --git a/nvim/.config/nvim/lua/github/pr_picker.lua b/nvim/.config/nvim/lua/github/pr_picker.lua new file mode 100644 index 0000000..246fefd --- /dev/null +++ b/nvim/.config/nvim/lua/github/pr_picker.lua @@ -0,0 +1,61 @@ +local pickers = require("telescope.pickers") +local finders = require("telescope.finders") +local conf = require("telescope.config").values +local actions = require("telescope.actions") +local action_state = require("telescope.actions.state") + +local function fetch_prs() + local result = vim.fn.system( + "gh pr list --json number,title,headRefName,baseRefName --limit 120 --search 'sort:created-desc'" + ) + if vim.v.shell_error ~= 0 then + vim.notify("Failed to fetch PRs: " .. result, vim.log.levels.ERROR) + return nil + end + return vim.json.decode(result) +end + +local function open_in_diffview(pr) + vim.fn.system({ "git", "fetch", "origin", pr.baseRefName, pr.headRefName }) + vim.cmd("DiffviewOpen origin/" .. pr.baseRefName .. "...origin/" .. pr.headRefName) +end + +local M = {} + +function M.pick() + local prs = fetch_prs() + if not prs or #prs == 0 then + vim.notify("No open pull requests found", vim.log.levels.WARN) + return + end + + pickers.new(require("telescope.themes").get_dropdown({ + winblend = 20, + previewer = false, + }), { + prompt_title = "Pull Requests", + finder = finders.new_table({ + results = prs, + entry_maker = function(pr) + local display = string.format("#%d %s", pr.number, pr.title) + return { + value = pr, + display = display, + ordinal = pr.title, + } + end, + }), + sorter = conf.generic_sorter({}), + attach_mappings = function(prompt_bufnr, _) + actions.select_default:replace(function() + actions.close(prompt_bufnr) + local selection = action_state.get_selected_entry() + if not selection then return end + open_in_diffview(selection.value) + end) + return true + end, + }):find() +end + +return M diff --git a/nvim/.config/nvim/lua/plugins/diffview.lua b/nvim/.config/nvim/lua/plugins/diffview.lua new file mode 100644 index 0000000..c4d8e3f --- /dev/null +++ b/nvim/.config/nvim/lua/plugins/diffview.lua @@ -0,0 +1,52 @@ +local toggleDiffview = function(rev) + local df = require("diffview") + local lib = require("diffview.lib") + local view = lib.get_current_view() + + if view then + df.close() + else + if rev then + df.open(rev) + else + df.open() + end + end +end + +return { + "sindrets/diffview.nvim", + + dependencies = { + "nvim-tree/nvim-web-devicons", + }, + config = function() + local diffview = require("diffview") + vim.opt.fillchars:append({ diff = "╱" }) + + diffview.setup({ + enhanced_diff_hl = true, + view = { + merge_tool = { + layout = "diff3_mixed", + }, + }, + }) + end, + keys = { + { + "dfl", + desc = "Toggle Diffview for local changes", + function() + toggleDiffview() + end, + }, + { + "dfr", + desc = "Toggle Diffview for remote changes", + function() + toggleDiffview("origin/current...HEAD") + end, + }, + }, +} diff --git a/nvim/.config/nvim/lua/plugins/lsp.lua b/nvim/.config/nvim/lua/plugins/lsp.lua index c6b9fc6..b42b3d5 100644 --- a/nvim/.config/nvim/lua/plugins/lsp.lua +++ b/nvim/.config/nvim/lua/plugins/lsp.lua @@ -7,16 +7,10 @@ return { -- NOTE: `opts = {}` is the same as calling `require('mason').setup({})` { 'mason-org/mason.nvim', - opts = { - -- registries = { - -- "github:mason-org/mason-registry", - -- "github:Crashdummyy/mason-registry", - -- }, - } + opts = { } }, 'WhoIsSethDaniel/mason-tool-installer.nvim', - "seblyng/roslyn.nvim", -- Useful status updates for LSP. { 'j-hui/fidget.nvim', opts = {} }, @@ -39,8 +33,7 @@ return { vim.keymap.set("n", "gi", function() vim.lsp.buf.implementation() end, opts) vim.keymap.set("n", "K", function() vim.lsp.buf.hover() end, opts) - vim.keymap.set("n", "//", function() vim.lsp.buf.format() end, opts) - vim.keymap.set("v", "//", function() vim.lsp.buf.format() end, opts) + vim.keymap.set({ "n", "v" }, "f", function() vim.lsp.buf.format() end, opts) vim.keymap.set("n", "ca", function() vim.lsp.buf.code_action() end, opts) vim.keymap.set("n", "vd", function() vim.diagnostic.open_float() end, opts) vim.keymap.set("i", "", function() vim.lsp.buf.signature_help() end, opts) @@ -57,7 +50,7 @@ return { -- For example, in C this would take you to the header. -- map('grD', vim.lsp.buf.declaration, '[G]oto [D]eclaration') local client = vim.lsp.get_client_by_id(event.data.client_id) - if client and client:supports_method('textDocument/documentHighlight', event.buf) then + if client and client.name ~= 'roslyn_ls' and client:supports_method('textDocument/documentHighlight', event.buf) then local highlight_augroup = vim.api.nvim_create_augroup('kickstart-lsp-highlight', { clear = false }) vim.api.nvim_create_autocmd({ 'CursorHold', 'CursorHoldI' }, { buffer = event.buf, @@ -87,14 +80,23 @@ return { local ensure_installed = vim.tbl_keys(servers or {}) vim.list_extend(ensure_installed, { - 'roslyn', - -- 'csharp-language-server', - 'lua-language-server', 'stylua', + 'lua-language-server', }) require('mason-tool-installer').setup { ensure_installed = ensure_installed } + -- dotnet tool -g install roslyn-language-server --prerelease + -- make sure dotnet tool folder is in path + servers['roslyn_ls'] = { + settings = { + ['csharp|background_analysis'] = { + dotnet_analyzer_diagnostics_scope = 'openFiles', + dotnet_compiler_diagnostics_scope = 'openFiles', + }, + }, + } + for name, server in pairs(servers) do server.capabilities = vim.tbl_deep_extend('force', {}, capabilities, server.capabilities or {}) vim.lsp.config(name, server) @@ -126,11 +128,5 @@ return { }, }) vim.lsp.enable 'lua_ls' - -- vim.lsp.enable 'csharp_ls' - require("roslyn").setup({ - env = { - DOTNET_ROLL_FORWARD = "LatestMajor", - }, - }) end, } diff --git a/nvim/.config/nvim/lua/plugins/neotest.lua b/nvim/.config/nvim/lua/plugins/neotest.lua index 10ff0e8..c536d88 100644 --- a/nvim/.config/nvim/lua/plugins/neotest.lua +++ b/nvim/.config/nvim/lua/plugins/neotest.lua @@ -4,24 +4,93 @@ return { dependencies = { "nvim-neotest/nvim-nio", "nvim-lua/plenary.nvim", + "nsidorenco/neotest-vstest", "antoinemadec/FixCursorHold.nvim", "nvim-treesitter/nvim-treesitter", - - -- "Issafalcon/neotest-dotnet", - "nsidorenco/neotest-vstest", }, - + keys = { + { + "tr", + function() + require("neotest").run.run() + end, + desc = "Run nearest test", + }, + { + "tf", + function() + require("neotest").run.run(vim.fn.expand("%")) + end, + desc = "Run all tests in file", + }, + { + "tp", + function() + require("neotest").output_panel.toggle() + end, + desc = "Toggle test output panel", + }, + { + "td", + function() + require("neotest").run.run({ strategy = "dap" }) + end, + desc = "Debug nearest test", + }, + { + "td", + function() + require("neotest").summary.toggle() + end, + desc = "Toggle test summary", + }, + }, config = function() - local neotest = require 'neotest' - - neotest.setup({ + require("neotest").setup({ + log_level = vim.log.levels.DEBUG, adapters = { require("neotest-vstest"), }, }) - - vim.keymap.set("n", "tr", function() require("neotest").run.run() end, opts) - vim.keymap.set("n", "tf", function() require("neotest").run.run(vim.fn.expand("%")) end, opts) - vim.keymap.set("n", "ts", function() require("neotest").summary.toggle() end, opts) end, } + +-- return { +-- "nvim-neotest/neotest", +-- dependencies = { +-- "nvim-neotest/nvim-nio", +-- "nvim-lua/plenary.nvim", +-- "antoinemadec/FixCursorHold.nvim", +-- "nvim-treesitter/nvim-treesitter", +-- "nsidorenco/neotest-vstest", +-- }, +-- config = function() +-- -- NOTE: This should be set before calling require("neotest-vstest") +-- vim.g.neotest_vstest = { +-- -- Path to dotnet sdk path. +-- -- Used in cases where the sdk path cannot be auto discovered. +-- --sdk_path = "/usr/local/dotnet/sdk/9.0.101/", +-- -- table is passed directly to DAP when debugging tests. +-- dap_settings = { +-- type = "netcoredbg", +-- }, +-- -- If multiple solutions exists the adapter will ask you to choose one. +-- -- If you have a different heuristic for choosing a solution you can provide a function here. +-- solution_selector = function(solutions) +-- return nil -- return the solution you want to use or nil to let the adapter choose. +-- end, +-- -- If multiple .runsettings/testconfig.json files are present in the test project directory +-- -- you will be given the choice of file to use when setting up the adapter. +-- -- Or you can provide a function here +-- -- default nil to select from all files in project directory +-- settings_selector = function(project_dir) +-- return nil -- return the .runsettings/testconfig.json file you want to use or let the adapter choose +-- end, +-- build_opts = { +-- -- Arguments that will be added to all dotnet build and dotnet msbuild commands +-- additional_args = {}, +-- }, +-- timeout_ms = 30 * 5 * 1000, -- number of milliseconds to wait before timeout while communicating with adapter client +-- +-- +-- end, diff --git a/nvim/.config/nvim/lua/plugins/telescope.lua b/nvim/.config/nvim/lua/plugins/telescope.lua index ae30ade..8fdf83c 100644 --- a/nvim/.config/nvim/lua/plugins/telescope.lua +++ b/nvim/.config/nvim/lua/plugins/telescope.lua @@ -1,48 +1,107 @@ return { - "nvim-telescope/telescope.nvim", - - dependencies = { - "nvim-lua/plenary.nvim", - }, - - config = function() - require("telescope").setup({ - defaults = { - file_ignore_patterns = { - "%.DS_Store", - "%.git/", - }, - }, - pickers = { - find_files = { - hidden = true, -- Keep this to see .env, .config, etc. - }, - }, - }) - - local builtin = require("telescope.builtin") - - vim.keymap.set("n", "ff", function() - builtin.find_files() - end, {}) - - vim.keymap.set("n", "fb", builtin.buffers, {}) - vim.keymap.set("n", "", builtin.git_files, {}) - - vim.keymap.set("n", "pws", function() - local word = vim.fn.expand("") - builtin.grep_string({ search = word }) - end) - - vim.keymap.set("n", "pWs", function() - local word = vim.fn.expand("") - builtin.grep_string({ search = word }) - end) - - vim.keymap.set("n", "fg", function() - builtin.live_grep({ additional_args = { "--hidden" } }) - end, { desc = "Telescope live grep" }) - - vim.keymap.set("n", "fh", builtin.help_tags, {}) - end, + "nvim-telescope/telescope.nvim", + + dependencies = { + "nvim-lua/plenary.nvim", + { -- If encountering errors, see telescope-fzf-native README for installation instructions + 'nvim-telescope/telescope-fzf-native.nvim', + + -- `build` is used to run some command when the plugin is installed/updated. + -- This is only run then, not every time Neovim starts up. + build = 'make', + + -- `cond` is a condition used to determine whether this plugin should be + -- installed and loaded. + cond = function() return vim.fn.executable 'make' == 1 end, + }, + { 'nvim-telescope/telescope-ui-select.nvim' }, + + -- Useful for getting pretty icons, but requires a Nerd Font. + { 'nvim-tree/nvim-web-devicons', enabled = vim.g.have_nerd_font }, + }, + + config = function() + require("telescope").setup({ + defaults = { + file_ignore_patterns = { + "%.DS_Store", + "%.git/", + }, + }, + pickers = { + find_files = { + hidden = true, -- Keep this to see .env, .config, etc. + }, + }, + extensions = { + ['ui-select'] = { require('telescope.themes').get_dropdown() }, + }, + }) + + -- Enable Telescope extensions if they are installed + pcall(require('telescope').load_extension, 'fzf') + pcall(require('telescope').load_extension, 'ui-select') + + local builtin = require("telescope.builtin") + + vim.keymap.set('n', 'sc', builtin.commands, { desc = '[S]earch [C]ommands' }) + + vim.keymap.set('n', 'sg', function() builtin.live_grep({ additional_args = { "--hidden" } }) end, + { desc = '[S]earch by [G]rep' }) + + vim.keymap.set('n', 'sh', builtin.help_tags, { desc = '[S]earch [H]elp' }) + vim.keymap.set('n', 'sk', builtin.keymaps, { desc = '[S]earch [K]eymaps' }) + + -- new ones + vim.keymap.set('n', 'sf', builtin.find_files, { desc = '[S]earch [F]iles' }) + vim.keymap.set('n', 's.', builtin.oldfiles, { desc = '[S]earch Recent Files ("." for repeat)' }) + vim.keymap.set('n', 'sr', builtin.resume, { desc = '[S]earch [R]esume' }) + vim.keymap.set('n', '', builtin.buffers, { desc = '[ ] Find existing buffers' }) + + + vim.keymap.set('n', '/', function() + -- You can pass additional configuration to Telescope to change the theme, layout, etc. + builtin.current_buffer_fuzzy_find(require('telescope.themes').get_dropdown { + winblend = 20, + previewer = false, + }) + end, { desc = '[/] Fuzzily search in current buffer' }) + + -- This runs on LSP attach per buffer (see main LSP attach function in 'neovim/nvim-lspconfig' config for more info, + -- it is better explained there). This allows easily switching between pickers if you prefer using something else! + vim.api.nvim_create_autocmd('LspAttach', { + group = vim.api.nvim_create_augroup('telescope-lsp-attach', { clear = true }), + callback = function(event) + local buf = event.buf + + -- Find references for the word under your cursor. + vim.keymap.set('n', 'grr', builtin.lsp_references, { buffer = buf, desc = '[G]oto [R]eferences' }) + + -- Jump to the implementation of the word under your cursor. + -- Useful when your language has ways of declaring types without an actual implementation. + vim.keymap.set('n', 'gri', builtin.lsp_implementations, + { buffer = buf, desc = '[G]oto [I]mplementation' }) + + -- Jump to the definition of the word under your cursor. + -- This is where a variable was first declared, or where a function is defined, etc. + -- To jump back, press . + vim.keymap.set('n', 'grd', builtin.lsp_definitions, { buffer = buf, desc = '[G]oto [D]efinition' }) + + -- Fuzzy find all the symbols in your current document. + -- Symbols are things like variables, functions, types, etc. + vim.keymap.set('n', 'gO', builtin.lsp_document_symbols, { buffer = buf, desc = 'Open Document Symbols' }) + + -- Fuzzy find all the symbols in your current workspace. + -- Similar to document symbols, except searches over your entire project. + vim.keymap.set('n', 'gW', builtin.lsp_dynamic_workspace_symbols, + { buffer = buf, desc = 'Open Workspace Symbols' }) + + -- Jump to the type of the word under your cursor. + -- Useful when you're not sure what type a variable is and you want to see + -- the definition of its *type*, not where it was *defined*. + vim.keymap.set('n', 'grt', builtin.lsp_type_definitions, + { buffer = buf, desc = '[G]oto [T]ype Definition' }) + end, + }) + end, } diff --git a/tmux/.tmux.conf b/tmux/.tmux.conf index 18c33d9..36044b0 100644 --- a/tmux/.tmux.conf +++ b/tmux/.tmux.conf @@ -1,6 +1,9 @@ # General set -g default-terminal "screen-256color" set-option -g allow-rename off +set-option -g status-position top +set-option -g focus-events on +setw -g mode-keys vi # Prefix & Reload unbind C-b @@ -13,8 +16,10 @@ bind -n M-Up select-pane -U bind -n M-Down select-pane -D bind -n M-Left select-pane -L bind -n M-Right select-pane -R -bind -n M-h previous-window -bind -n M-l next-window +bind -n C-h previous-window +bind -n C-l next-window +bind -n C-k switch-client -p +bind -n C-j switch-client -n # Status Content set -g status-left ""