Skip to content

Commit

Permalink
ok
Browse files Browse the repository at this point in the history
  • Loading branch information
DivineGod committed Dec 11, 2022
1 parent 5233a51 commit 2e82007
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 3 deletions.
22 changes: 22 additions & 0 deletions nvim/.config/nvim/ftplugin/rust.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
-- Rust specific keybindings
local keymap = vim.keymap.set
local key_opts = { silent = true }

keymap("n", "<leader>rh", "<cmd>RustSetInlayHints<Cr>", key_opts)
keymap("n", "<leader>rhd", "<cmd>RustDisableInlayHints<Cr>", key_opts)
keymap("n", "<leader>th", "<cmd>RustToggleInlayHints<Cr>", key_opts)
keymap("n", "<leader>rr", "<cmd>RustRunnables<Cr>", key_opts)
keymap("n", "<leader>rem", "<cmd>RustExpandMacro<Cr>", key_opts)
keymap("n", "<leader>roc", "<cmd>RustOpenCargo<Cr>", key_opts)
keymap("n", "<leader>rpm", "<cmd>RustParentModule<Cr>", key_opts)
keymap("n", "<leader>rjl", "<cmd>RustJoinLines<Cr>", key_opts)
keymap("n", "<leader>rha", "<cmd>RustHoverActions<Cr>", key_opts)
keymap("n", "<leader>rhr", "<cmd>RustHoverRange<Cr>", key_opts)
keymap("n", "<leader>rmd", "<cmd>RustMoveItemDown<Cr>", key_opts)
keymap("n", "<leader>rmu", "<cmd>RustMoveItemUp<Cr>", key_opts)
keymap("n", "<leader>rsb", "<cmd>RustStartStandaloneServerForBuffer<Cr>", key_opts)
keymap("n", "<leader>rd", "<cmd>RustDebuggables<Cr>", key_opts)
keymap("n", "<leader>rv", "<cmd>RustViewCrateGraph<Cr>", key_opts)
keymap("n", "<leader>rw", "<cmd>RustReloadWorkspace<Cr>", key_opts)
keymap("n", "<leader>rss", "<cmd>RustSSR<Cr>", key_opts)
keymap("n", "<leader>rxd", "<cmd>RustOpenExternalDocs<Cr>", key_opts)
4 changes: 3 additions & 1 deletion nvim/.config/nvim/lua/user/project.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
4 changes: 2 additions & 2 deletions nvim/.config/nvim/lua/user/telescope.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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"},
},
},
Expand Down

0 comments on commit 2e82007

Please sign in to comment.