COQ works now.
Maybe because I removed Mason though? Either way this is good enough
This commit is contained in:
parent
95ccdf5597
commit
05de49e70e
@ -62,18 +62,9 @@
|
|||||||
nvim-web-devicons
|
nvim-web-devicons
|
||||||
nvim-lspconfig
|
nvim-lspconfig
|
||||||
packer-nvim
|
packer-nvim
|
||||||
nvim-cmp
|
|
||||||
vim-lsp
|
vim-lsp
|
||||||
cmp-nvim-lua
|
|
||||||
cmp-nvim-lsp
|
|
||||||
cmp-nvim-lsp-signature-help
|
|
||||||
cmp-path
|
|
||||||
cmp-buffer
|
|
||||||
cmp-vsnip
|
|
||||||
vim-vsnip
|
vim-vsnip
|
||||||
mason-nvim
|
coq_nvim
|
||||||
mason-lspconfig-nvim
|
|
||||||
rust-tools-nvim
|
|
||||||
vimspector
|
vimspector
|
||||||
vimagit
|
vimagit
|
||||||
hoon-vim
|
hoon-vim
|
||||||
|
@ -13,18 +13,6 @@ require('nightfox').setup({
|
|||||||
})
|
})
|
||||||
vim.cmd("colorscheme carbonfox")
|
vim.cmd("colorscheme carbonfox")
|
||||||
|
|
||||||
-- Mason setup for lsp management
|
|
||||||
require("mason").setup({
|
|
||||||
ui = {
|
|
||||||
icons = {
|
|
||||||
package_installed = "*",
|
|
||||||
package_pending = ".";
|
|
||||||
package_uninstalled = "-",
|
|
||||||
},
|
|
||||||
}
|
|
||||||
})
|
|
||||||
require("mason-lspconfig").setup()
|
|
||||||
|
|
||||||
--https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md
|
--https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md
|
||||||
|
|
||||||
local lsconfig = require("lspconfig")
|
local lsconfig = require("lspconfig")
|
||||||
@ -46,12 +34,17 @@ lsconfig.rust_analyzer.setup{}
|
|||||||
-- lsp configuration
|
-- lsp configuration
|
||||||
vim.api.nvim_create_autocmd('LspAttach', {
|
vim.api.nvim_create_autocmd('LspAttach', {
|
||||||
callback = function(args)
|
callback = function(args)
|
||||||
vim.keymap.set('n', '<C-space>', vim.lsp.buf.hover, { buffer = args.buf })
|
local opts = { buffer = args.buf }
|
||||||
vim.keymap.set({"n", "v"}, "<Leader>a", vim.lsp.buf.code_action, { buffer = args.buf })
|
vim.keymap.set("n", '<C-Space>', function()
|
||||||
vim.keymap.set("n", "<M-f>", vim.lsp.buf.references, { buffer = args.buf })
|
vim.notify("triggering hover")
|
||||||
vim.keymap.set("n", "<Leader>f", vim.lsp.buf.format, { buffer = args.buf })
|
vim.lsp.buf.hover()
|
||||||
|
end, opts)
|
||||||
|
vim.keymap.set({"n", "v"}, "<Leader>a", vim.lsp.buf.code_action, opts)
|
||||||
|
vim.keymap.set("n", "gr", vim.lsp.buf.references, opts)
|
||||||
|
vim.keymap.set("n", "gd", vim.lsp.buf.definition, opts)
|
||||||
|
vim.keymap.set("n", "<Leader>f", vim.lsp.buf.format, opts)
|
||||||
-- We use F2 to rename things
|
-- We use F2 to rename things
|
||||||
vim.keymap.set("n", "<F2>", vim.lsp.buf.rename, { buffer = args.buf })
|
vim.keymap.set("n", "<F2>", vim.lsp.buf.rename, opts)
|
||||||
--vim.keymap.set("n", "", vim.lsp.buf.implementation, { buffer = args.buf })
|
--vim.keymap.set("n", "", vim.lsp.buf.implementation, { buffer = args.buf })
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
@ -110,59 +103,6 @@ set signcolumn=yes
|
|||||||
autocmd CursorHold * lua vim.diagnostic.open_float(nil, { focusable = false })
|
autocmd CursorHold * lua vim.diagnostic.open_float(nil, { focusable = false })
|
||||||
]])
|
]])
|
||||||
|
|
||||||
-- Completion Plugin Setup
|
|
||||||
local cmp = require'cmp'
|
|
||||||
cmp.setup({
|
|
||||||
-- Enable LSP snippets
|
|
||||||
snippet = {
|
|
||||||
expand = function(args)
|
|
||||||
vim.fn["vsnip#anonymous"](args.body)
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
mapping = {
|
|
||||||
['<C-p>'] = cmp.mapping.select_prev_item(),
|
|
||||||
['<C-n>'] = cmp.mapping.select_next_item(),
|
|
||||||
-- Add tab support
|
|
||||||
['<S-Tab>'] = cmp.mapping.select_prev_item(),
|
|
||||||
['<Tab>'] = cmp.mapping.select_next_item(),
|
|
||||||
['<C-S-f>'] = cmp.mapping.scroll_docs(-4),
|
|
||||||
['<C-f>'] = cmp.mapping.scroll_docs(4),
|
|
||||||
['<C-Space>'] = cmp.mapping.complete(),
|
|
||||||
['<C-e>'] = cmp.mapping.close(),
|
|
||||||
['<CR>'] = cmp.mapping.confirm({
|
|
||||||
behavior = cmp.ConfirmBehavior.Insert,
|
|
||||||
select = true,
|
|
||||||
})
|
|
||||||
},
|
|
||||||
-- Installed sources:
|
|
||||||
sources = {
|
|
||||||
{ name = 'path' }, -- file paths
|
|
||||||
{ name = 'nvim_lsp', keyword_length = 3 }, -- from language server
|
|
||||||
{ name = 'nvim_lsp_signature_help'}, -- display function signatures with current parameter emphasized
|
|
||||||
{ name = 'nvim_lua', keyword_length = 2}, -- complete neovim's Lua runtime API such vim.lsp.*
|
|
||||||
{ name = 'buffer', keyword_length = 2 }, -- source current buffer
|
|
||||||
{ name = 'vsnip', keyword_length = 2 }, -- nvim-cmp source for vim-vsnip
|
|
||||||
{ name = 'calc'}, -- source for math calculation
|
|
||||||
},
|
|
||||||
window = {
|
|
||||||
completion = cmp.config.window.bordered(),
|
|
||||||
documentation = cmp.config.window.bordered(),
|
|
||||||
},
|
|
||||||
formatting = {
|
|
||||||
fields = {'menu', 'abbr', 'kind'},
|
|
||||||
format = function(entry, item)
|
|
||||||
local menu_icon ={
|
|
||||||
nvim_lsp = 'λ',
|
|
||||||
vsnip = '⋗',
|
|
||||||
buffer = 'Ω',
|
|
||||||
path = '🖫',
|
|
||||||
}
|
|
||||||
item.menu = menu_icon[entry.source.name]
|
|
||||||
return item
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Treesitter Plugin Setup
|
-- Treesitter Plugin Setup
|
||||||
require('nvim-treesitter.configs').setup {
|
require('nvim-treesitter.configs').setup {
|
||||||
highlight = {
|
highlight = {
|
||||||
@ -205,4 +145,9 @@ vim.keymap.set("n", "<C-p>", function()
|
|||||||
require("nvim-tree.api").tree.toggle()
|
require("nvim-tree.api").tree.toggle()
|
||||||
end)
|
end)
|
||||||
|
|
||||||
require("nvim-tree.api").tree.toggle()
|
vim.keymap.set("i", "<C-j>", function()
|
||||||
|
print("Handling C-J")
|
||||||
|
vim.notify("Handling C-J")
|
||||||
|
end)
|
||||||
|
|
||||||
|
--require("nvim-tree.api").tree.toggle()
|
||||||
|
6
nix/darwin/flake.lock
generated
6
nix/darwin/flake.lock
generated
@ -34,12 +34,12 @@
|
|||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1,
|
"lastModified": 1,
|
||||||
"narHash": "sha256-SbQ+XfMrqzNICok/PcnjciXYRQPQYtfEuFTKGlKg0c0=",
|
"narHash": "sha256-0RGMuP82J/U0JfCVuTlsNat4vIfjNQv9dw+qpGA8EWY=",
|
||||||
"path": "/nix/store/9y1n15br996sqsh4s4q3j3n16217cnny-source/nix/base-system",
|
"path": "/nix/store/wi3k5hsf1ibbasdap31wbprp7f78bsjx-source/nix/base-system",
|
||||||
"type": "path"
|
"type": "path"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"path": "/nix/store/9y1n15br996sqsh4s4q3j3n16217cnny-source/nix/base-system",
|
"path": "/nix/store/wi3k5hsf1ibbasdap31wbprp7f78bsjx-source/nix/base-system",
|
||||||
"type": "path"
|
"type": "path"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user