Skip to content

Commit

Permalink
Add completions in the command line
Browse files Browse the repository at this point in the history
  • Loading branch information
albertogg committed Aug 3, 2024
1 parent 16883ee commit c720ccd
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 2 deletions.
23 changes: 23 additions & 0 deletions config/nvim/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,29 @@ require("lazy").setup({
},
}

local cmp = require("cmp")

cmp.setup.cmdline("/", {
mapping = cmp.mapping.preset.cmdline(),
sources = {
{ name = "buffer" }
}
})

cmp.setup.cmdline(":", {
mapping = cmp.mapping.preset.cmdline(),
sources = cmp.config.sources({
{ name = "path" }
}, {
{
name = "cmdline",
option = {
ignore_cmds = { "Man", "!" }
}
}
})
})

local lspconfig = require("lspconfig")

lspconfig.pyright.setup {
Expand Down
4 changes: 2 additions & 2 deletions rust.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ else
exit 1
fi

# Install rust-analyzer for completions, docs, and clippy.
rustup component add rust-analyzer rustfmt rust-docs clippy
# Install docs, and clippy.
rustup component add rustfmt rust-docs clippy

0 comments on commit c720ccd

Please sign in to comment.