You've already forked dotfiles
feat: changing some naming conventions, adding in the
arduino_language_server setup and adding the fugitive plugin for git actions.
This commit is contained in:
9
nvim/after/lsp/arduino_language_server.lua
Normal file
9
nvim/after/lsp/arduino_language_server.lua
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
return {
|
||||||
|
cmd = {
|
||||||
|
"arduino-language-server",
|
||||||
|
"-clangd", "/usr/lib/llvm/21/bin/clangd",
|
||||||
|
"-cli", "/usr/bin/arduino-cli",
|
||||||
|
"-cli-config", "~/.arduino15/arduino-cli.yaml",
|
||||||
|
"-fqbn", "esp32:esp32:adafruit_qtpy_esp32s3_nopsram"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -20,10 +20,14 @@ return {
|
|||||||
test = {
|
test = {
|
||||||
python = 'pytest',
|
python = 'pytest',
|
||||||
rust = 'cargo test',
|
rust = 'cargo test',
|
||||||
|
cpp = 'make test',
|
||||||
},
|
},
|
||||||
benchmark = {
|
benchmark = {
|
||||||
rust = 'cargo bench',
|
rust = 'cargo bench',
|
||||||
},
|
},
|
||||||
|
upload = {
|
||||||
|
cpp = 'make upload',
|
||||||
|
}
|
||||||
}
|
}
|
||||||
vim.api.nvim_command('write')
|
vim.api.nvim_command('write')
|
||||||
local command = command_table[type][vim.bo.filetype]
|
local command = command_table[type][vim.bo.filetype]
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
vim.g.mapleader = ','
|
vim.g.mapleader = ','
|
||||||
|
|
||||||
-- Expose custom functions for binding
|
-- Expose custom functions for binding
|
||||||
local cf = require('custom_functions')
|
local custom_functions = require('custom_functions')
|
||||||
|
|
||||||
-- Standard keybinding options
|
-- Standard keybinding options
|
||||||
local options = { noremap = true }
|
local options = { noremap = true }
|
||||||
@@ -51,10 +51,11 @@ vim.keymap.set('n', '<leader>w', ':set list!<CR>', options)
|
|||||||
vim.keymap.set('n', '<space>', 'za')
|
vim.keymap.set('n', '<space>', 'za')
|
||||||
|
|
||||||
-- Keymaps for custom functions
|
-- Keymaps for custom functions
|
||||||
vim.keymap.set('n', '<leader>et', function() cf.execute('test') end)
|
vim.keymap.set('n', '<leader>et', function() custom_functions.execute('test') end)
|
||||||
vim.keymap.set('n', '<leader>er', function() cf.execute('run') end)
|
vim.keymap.set('n', '<leader>er', function() custom_functions.execute('run') end)
|
||||||
vim.keymap.set('n', '<leader>eb', function() cf.execute('build') end)
|
vim.keymap.set('n', '<leader>eb', function() custom_functions.execute('build') end)
|
||||||
vim.keymap.set('n', '<leader>em', function() cf.execute('benchmark') end)
|
vim.keymap.set('n', '<leader>em', function() custom_functions.execute('benchmark') end)
|
||||||
|
vim.keymap.set('n', '<leader>eu', function() custom_functions.execute('upload') end)
|
||||||
|
|
||||||
vim.keymap.set('n', '<leader>eo', ':Lexplore<CR>', options)
|
vim.keymap.set('n', '<leader>eo', ':Lexplore<CR>', options)
|
||||||
|
|
||||||
|
|||||||
@@ -36,5 +36,6 @@ require('lazy').setup({
|
|||||||
require('plugins.autopairs'), -- Autocomplete symbol pairs when typing (experimental)
|
require('plugins.autopairs'), -- Autocomplete symbol pairs when typing (experimental)
|
||||||
require('plugins.twilight'), -- Focus mode, dim lines around the current segment of code
|
require('plugins.twilight'), -- Focus mode, dim lines around the current segment of code
|
||||||
require('plugins.yaml-companion'), -- Additional YAML and JSON schema helper
|
require('plugins.yaml-companion'), -- Additional YAML and JSON schema helper
|
||||||
|
require('plugins.fugitive'), -- _The_ Git integration plugin people have been using forever
|
||||||
-- require('plugins.schemastore'), -- Loads YAML and JSON schemas for autocompletion
|
-- require('plugins.schemastore'), -- Loads YAML and JSON schemas for autocompletion
|
||||||
})
|
})
|
||||||
|
|||||||
3
nvim/lua/plugins/fugitive.lua
Normal file
3
nvim/lua/plugins/fugitive.lua
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
return {
|
||||||
|
'tpope/vim-fugitive',
|
||||||
|
}
|
||||||
@@ -6,7 +6,6 @@ return {
|
|||||||
require('mason-lspconfig').setup {
|
require('mason-lspconfig').setup {
|
||||||
automatic_enable = true,
|
automatic_enable = true,
|
||||||
ensure_installed = {
|
ensure_installed = {
|
||||||
-- Currently having issues with including some of the LSPs, even though they match the names in Mason
|
|
||||||
'ansiblels', -- Ansible
|
'ansiblels', -- Ansible
|
||||||
'arduino_language_server', -- Arduino specific C
|
'arduino_language_server', -- Arduino specific C
|
||||||
'bashls', -- Bash
|
'bashls', -- Bash
|
||||||
|
|||||||
Reference in New Issue
Block a user