Merge branch 'main' into linux

This commit is contained in:
Mariano Uvalle 2022-12-12 16:08:02 -08:00 committed by GitHub
commit 095f096de5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 74 additions and 312 deletions

9
lua/lsp/arduino-ls.lua Normal file
View file

@ -0,0 +1,9 @@
require'lspconfig'.arduino_language_server.setup {
cmd = {
"arduino-language-server",
"-cli-config", "/Users/aym/Library/Arduino15/arduino-cli.yaml",
"-fqbn", "adafruit:nrf52:feather52841",
"-cli", "arduino-cli",
"-clangd", "clangd"
}
}

3
lua/lsp/flutter-ls.lua Normal file
View file

@ -0,0 +1,3 @@
require("flutter-tools").setup{
} -- use defaults

View file

@ -69,3 +69,6 @@ vim.g.go_highlight_types = 1
vim.g.go_highlight_extra_types = 1
vim.g.go_highlight_functions = 1
vim.g.go_highlight_function_calls = 1
local saga = require 'lspsaga'
saga.init_lsp_saga()

View file

@ -1,14 +0,0 @@
local lsp = vim.lsp
local handlers = lsp.handlers
-- Hover doc popup
local pop_opts = { border = "rounded", max_width = 80 }
handlers["textDocument/hover"] = lsp.with(handlers.hover, pop_opts)
handlers["textDocument/signatureHelp"] = lsp.with(handlers.signature_help, pop_opts)
vim.api.nvim_set_keymap('n', '<Leader>lgd', '<cmd>lua vim.lsp.buf.definition()<CR>', {noremap = true, silent = true})
vim.api.nvim_set_keymap('n', '<Leader>lgD', '<cmd>lua vim.lsp.buf.declaration()<CR>', {noremap = true, silent = true})
vim.api.nvim_set_keymap('n', '<Leader>lgr', '<cmd>lua vim.lsp.buf.references()<CR>', {noremap = true, silent = true})
vim.api.nvim_set_keymap('n', '<Leader>lgi', '<cmd>lua vim.lsp.buf.implementation()<CR>', {noremap = true, silent = true})
vim.api.nvim_set_keymap('n', '<Leader>lr', '<cmd>lua require("lspsaga.rename").rename()<CR>', {noremap = true, silent = true})
vim.api.nvim_set_keymap('n', 'K', '<cmd>lua vim.lsp.buf.hover()<CR>', {noremap = true, silent = true})