1
0
Fork 0

fix: add trouble and formatter nvim plugins

Signed-off-by: Lucas Sta Maria <lucas@priime.dev>
This commit is contained in:
Lucas Sta Maria 2023-02-08 00:31:48 -05:00
parent ded04456cb
commit 6db99389bc
No known key found for this signature in database
GPG key ID: F07FB16A826E3B47
4 changed files with 12 additions and 8 deletions

View file

@ -7,8 +7,6 @@ local function map(mode, lhs, rhs, opts)
vim.api.nvim_set_keymap(mode, lhs, rhs, options) vim.api.nvim_set_keymap(mode, lhs, rhs, options)
end end
require("nvim-autopairs").setup {}
map("i", "<C-c>", "<ESC>:w<CR>:!just<CR>") map("i", "<C-c>", "<ESC>:w<CR>:!just<CR>")
map("n", "<C-c>", "<ESC>:w<CR>:!just<CR>") map("n", "<C-c>", "<ESC>:w<CR>:!just<CR>")

View file

@ -30,7 +30,6 @@ cmp.setup({
{ name = 'nvim_lsp' }, { name = 'nvim_lsp' },
{ name = 'ultisnips' }, -- For ultisnips users. { name = 'ultisnips' }, -- For ultisnips users.
}, { }, {
{ name = 'buffer' },
}) })
}) })
@ -151,9 +150,6 @@ lspconfig.java_language_server.setup {
lspconfig.racket_langserver.setup { lspconfig.racket_langserver.setup {
on_attach = on_attach, on_attach = on_attach,
capabilities = capabilities, capabilities = capabilities,
root_dir = lspconfig.util.root_pattern(
'main.rkt'
)
} }
lspconfig.ocamllsp.setup { lspconfig.ocamllsp.setup {
@ -161,7 +157,7 @@ lspconfig.ocamllsp.setup {
capabilities = capabilities, capabilities = capabilities,
} }
lspconfig.pylsp.setup { lspconfig.jedi_language_server.setup {
on_attach = on_attach, on_attach = on_attach,
capabilities = capabilities, capabilities = capabilities,
} }

View file

@ -8,7 +8,7 @@ local function map(mode, lhs, rhs, opts)
end end
-- format -- format
map('n', '<leader>f', ':Format<CR>') map('n', '<leader>f', ':w<CR>:Format<CR>')
-- open terminal -- open terminal
map("n", "<leader>ott", ":ToggleTerm<CR>") map("n", "<leader>ott", ":ToggleTerm<CR>")
@ -56,3 +56,6 @@ map("n", "<C-k>", ":BufferLineCycleNext<CR>")
map("n", "<C-j>", ":BufferLineCyclePrev<CR>") map("n", "<C-j>", ":BufferLineCyclePrev<CR>")
map("n", "<C-S-k>", ":BufferLineMoveNext<CR>") map("n", "<C-S-k>", ":BufferLineMoveNext<CR>")
map("n", "<C-S-j>", ":BufferLineMovePrev<CR>") map("n", "<C-S-j>", ":BufferLineMovePrev<CR>")
-- trouble
map("n", "<leader>od", ":TroubleToggle<CR>")

View file

@ -32,6 +32,7 @@ packer.startup(function()
use("simrat39/symbols-outline.nvim") use("simrat39/symbols-outline.nvim")
use("lcheylus/overlength.nvim") use("lcheylus/overlength.nvim")
use("akinsho/bufferline.nvim") use("akinsho/bufferline.nvim")
use("folke/trouble.nvim")
-- completion -- completion
use("hrsh7th/cmp-nvim-lsp") use("hrsh7th/cmp-nvim-lsp")
@ -178,6 +179,9 @@ require('formatter').setup {
} }
end end
}, },
c = {
require('formatter.filetypes.c').clangformat
},
cpp = { cpp = {
require('formatter.filetypes.cpp').clangformat require('formatter.filetypes.cpp').clangformat
}, },
@ -213,3 +217,6 @@ require('Comment').setup {}
require("nvim-autopairs").setup { require("nvim-autopairs").setup {
disable_filetype = { "TelescopePrompt", "racket" } disable_filetype = { "TelescopePrompt", "racket" }
} }
-- trouple
require("trouble").setup {}