diff options
author | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2024-10-18 17:07:46 +0200 |
---|---|---|
committer | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2024-10-18 17:07:46 +0200 |
commit | c52c7f314ccadcc2fcd91e28c8fd1b88f6d5ce0c (patch) | |
tree | e8b947710b467b32740598ff574982097836f66c /modules/home/conf/nvim/plgs/goto-preview | |
parent | chore(pkgs/yt): 1.2.1 -> 1.3.0 (diff) | |
download | nixos-config-c52c7f314ccadcc2fcd91e28c8fd1b88f6d5ce0c.tar.gz nixos-config-c52c7f314ccadcc2fcd91e28c8fd1b88f6d5ce0c.zip |
refactor(modules): Move all system modules to `by-name`
From now on all modules should be added to the new `by-name` directory. This should help remove the (superficial and utterly useless) distinction between `home-manager` and `NixOS` modules.
Diffstat (limited to 'modules/home/conf/nvim/plgs/goto-preview')
-rw-r--r-- | modules/home/conf/nvim/plgs/goto-preview/default.nix | 47 | ||||
-rw-r--r-- | modules/home/conf/nvim/plgs/goto-preview/lua/goto-preview.lua | 21 |
2 files changed, 0 insertions, 68 deletions
diff --git a/modules/home/conf/nvim/plgs/goto-preview/default.nix b/modules/home/conf/nvim/plgs/goto-preview/default.nix deleted file mode 100644 index 3de28c68..00000000 --- a/modules/home/conf/nvim/plgs/goto-preview/default.nix +++ /dev/null @@ -1,47 +0,0 @@ -{ - pkgs, - lib, - ... -}: { - programs.nixvim = { - # TODO: package goto-preview though a module - extraConfigLuaPost = '' - ${lib.strings.fileContents ./lua/goto-preview.lua} - ''; - extraPlugins = [ - pkgs.vimPlugins.goto-preview - ]; - keymaps = [ - { - key = "<space>gd"; - mode = "n"; - action.__raw = "require('goto-preview').goto_preview_definition"; - options.desc = "[G]oto [D]efinition"; - } - { - key = "<space>gtd"; - mode = "n"; - action.__raw = "require('goto-preview').goto_preview_type_definition"; - options.desc = "[G]oto the [t]ype [D]efinition"; - } - { - key = "<space>gi"; - mode = "n"; - action.__raw = "require('goto-preview').goto_preview_implementation"; - options.desc = "[G]oto [I]mplementations"; - } - { - key = "<space>gr"; - mode = "n"; - action.__raw = "require('goto-preview').goto_preview_references"; - options.desc = "[G]o to all [R]eferences of the symbol"; - } - { - key = "\\<space>"; - mode = "n"; - action.__raw = "require('goto-preview').close_all_win"; - options.desc = "close all preview windows"; - } - ]; - }; -} diff --git a/modules/home/conf/nvim/plgs/goto-preview/lua/goto-preview.lua b/modules/home/conf/nvim/plgs/goto-preview/lua/goto-preview.lua deleted file mode 100644 index 9687a5a0..00000000 --- a/modules/home/conf/nvim/plgs/goto-preview/lua/goto-preview.lua +++ /dev/null @@ -1,21 +0,0 @@ -require("goto-preview").setup({ - width = 120, -- Width of the floating window - height = 15, -- Height of the floating window - border = { "↖", "─", "┐", "│", "┘", "─", "└", "│" }, -- Border characters of the floating window - default_mappings = false, -- Bind default mappings - debug = false, -- Print debug information - opacity = nil, -- 0-100 opacity level of the floating window where 100 is fully transparent. - resizing_mappings = false, -- Binds arrow keys to resizing the floating window. - post_open_hook = nil, -- A function taking two arguments, a buffer and a window to be ran as a hook. - post_close_hook = nil, -- A function taking two arguments, a buffer and a window to be ran as a hook. - references = { -- Configure the telescope UI for slowing the references cycling window. - telescope = {}, -- require("telescope.themes").get_dropdown({ hide_preview = false }) - }, - -- These two configs can also be passed down to the goto-preview definition and implementation calls for one off "peak" functionality. - focus_on_open = true, -- Focus the floating window when opening it. - dismiss_on_move = false, -- Dismiss the floating window when moving the cursor. - force_close = true, -- passed into vim.api.nvim_win_close's second argument. See :h nvim_win_close - bufhidden = "wipe", -- the bufhidden option to set on the floating window. See :h bufhidden - stack_floating_preview_windows = true, -- Whether to nest floating windows - preview_window_title = { enable = true, position = "left" }, -- Whether to set the preview window title as the filename -}) |