From 2e82007adc541396ffcc0cb684d793abd63e8895 Mon Sep 17 00:00:00 2001 From: "Ando \"Thor\" Nando" Date: Sun, 11 Dec 2022 15:55:42 +1100 Subject: [PATCH] ok --- nvim/.config/nvim/ftplugin/rust.lua | 22 ++++++++++++++++++++++ nvim/.config/nvim/lua/user/project.lua | 4 +++- nvim/.config/nvim/lua/user/telescope.lua | 4 ++-- 3 files changed, 27 insertions(+), 3 deletions(-) create mode 100644 nvim/.config/nvim/ftplugin/rust.lua diff --git a/nvim/.config/nvim/ftplugin/rust.lua b/nvim/.config/nvim/ftplugin/rust.lua new file mode 100644 index 0000000..f3fe849 --- /dev/null +++ b/nvim/.config/nvim/ftplugin/rust.lua @@ -0,0 +1,22 @@ +-- Rust specific keybindings +local keymap = vim.keymap.set +local key_opts = { silent = true } + +keymap("n", "rh", "RustSetInlayHints", key_opts) +keymap("n", "rhd", "RustDisableInlayHints", key_opts) +keymap("n", "th", "RustToggleInlayHints", key_opts) +keymap("n", "rr", "RustRunnables", key_opts) +keymap("n", "rem", "RustExpandMacro", key_opts) +keymap("n", "roc", "RustOpenCargo", key_opts) +keymap("n", "rpm", "RustParentModule", key_opts) +keymap("n", "rjl", "RustJoinLines", key_opts) +keymap("n", "rha", "RustHoverActions", key_opts) +keymap("n", "rhr", "RustHoverRange", key_opts) +keymap("n", "rmd", "RustMoveItemDown", key_opts) +keymap("n", "rmu", "RustMoveItemUp", key_opts) +keymap("n", "rsb", "RustStartStandaloneServerForBuffer", key_opts) +keymap("n", "rd", "RustDebuggables", key_opts) +keymap("n", "rv", "RustViewCrateGraph", key_opts) +keymap("n", "rw", "RustReloadWorkspace", key_opts) +keymap("n", "rss", "RustSSR", key_opts) +keymap("n", "rxd", "RustOpenExternalDocs", key_opts) diff --git a/nvim/.config/nvim/lua/user/project.lua b/nvim/.config/nvim/lua/user/project.lua index fb8e591..721ff27 100644 --- a/nvim/.config/nvim/lua/user/project.lua +++ b/nvim/.config/nvim/lua/user/project.lua @@ -8,7 +8,9 @@ project.setup({ detection_methods = { "pattern" }, -- patterns used to detect root dir, when **"pattern"** is in detection_methods - patterns = { ".git", "Makefile", "package.json" }, + patterns = { ".git" }, + + show_hidden = true }) local tele_status_ok, telescope = pcall(require, "telescope") diff --git a/nvim/.config/nvim/lua/user/telescope.lua b/nvim/.config/nvim/lua/user/telescope.lua index 1e8f00b..e5441e5 100644 --- a/nvim/.config/nvim/lua/user/telescope.lua +++ b/nvim/.config/nvim/lua/user/telescope.lua @@ -21,14 +21,14 @@ telescope.setup { prompt_prefix = " ", selection_caret = " ", - --path_display = { "smart" }, + -- path_display = { "smart" }, file_ignore_patterns = { ".git/", "node_modules" }, + vimgrep_arguments = vimgrep_arguments, pickers = { find_files = { -- `hidden = true` will still show the inside of `.git/` as it's not `.gitignore`d. - hidden = true, find_command = { "fd", "--type", "f", "--strip-cwd-prefix", "--hidden", "--exclude", ".git"}, }, },