aboutsummaryrefslogtreecommitdiff
path: root/nvim/lua/lsp.lua
diff options
context:
space:
mode:
Diffstat (limited to 'nvim/lua/lsp.lua')
-rw-r--r--nvim/lua/lsp.lua45
1 files changed, 0 insertions, 45 deletions
diff --git a/nvim/lua/lsp.lua b/nvim/lua/lsp.lua
deleted file mode 100644
index 8d8a804..0000000
--- a/nvim/lua/lsp.lua
+++ /dev/null
@@ -1,45 +0,0 @@
-require('mason').setup()
-
-local bufnr = vim.api.nvim_get_current_buf()
-vim.keymap.set('n', 'gra',
- function()
- vim.cmd.RustLsp('codeAction')
- end
-)
-
-vim.keymap.set('n', 'K',
- function()
- vim.cmd.RustLsp({'hover', 'actions'})
- end
-)
-
-vim.keymap.set('n', 'grd',
- function()
- vim.cmd.RustLsp({'renderDiagnostic', 'current'})
- end
-)
-
-local cmp = require('cmp')
-cmp.setup({
- mapping = cmp.mapping.preset.insert({
- ['<C-p>'] = cmp.mapping.select_prev_item({behavior = cmp.SelectBehavior.Select}),
- ['<C-n>'] = cmp.mapping.select_next_item({behavior = cmp.SelectBehavior.Select}),
- ['<C-b>'] = cmp.mapping.scroll_docs(-4),
- ['<C-f>'] = cmp.mapping.scroll_docs(4),
- ['<C-Space>'] = cmp.mapping.complete(),
- ['<CR>'] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
- }),
- sources = cmp.config.sources({
- { name = 'nvim_lsp' },
- }, {
- { name = 'buffer' },
- { name = "path" },
- })
-})
-
-cmp.setup.cmdline({ '/', '?' }, {
- mapping = cmp.mapping.preset.cmdline(),
- sources = {
- { name = 'buffer' }
- }
-})