This commit is contained in:
nova 2024-01-28 22:20:37 +01:00
parent 7f9c18536b
commit 56e9bb7d04
4 changed files with 51 additions and 13 deletions

View File

@ -17,3 +17,6 @@ vim.cmd(":set relativenumber")
vim.cmd("set foldmethod=marker")
vim.opt.fillchars:append { eob = " " }
--}}}
require("luasnip.loaders.from_vscode").lazy_load()
require("luasnip.loaders.from_vscode").lazy_load { paths = vim.g.vscode_snippets_path or "" }

View File

@ -23,6 +23,17 @@ vim.keymap.set("t", "<Esc>", "<C-\\><C-n>") --exit terminal mode with esc
vim.keymap.set("n", "<A-ESC>", ":tabnew | terminal htop<cr>") --open htop in new tab
vim.keymap.set("n", "<A-t>", ":tabnew | terminal termusic<cr>") --open termusic (a music player) in new tab
vim.keymap.set("n", "<A-m>", ":tabnew | terminal gomuks<cr>") --open gomuks (a matrix client) in new tab
vim.keymap.set("n", "<A-r>", ":tabnew | terminal ranger<cr>") --open ranger (a file manager) in new tab
vim.keymap.set("n", "<A-V>", ":split new<cr>") --create a new split
vim.keymap.set("n", "<A-v>", ":vs new<cr>") --create a vplit
--dvorak
vim.keymap.set({"n","v","o"}, "h", "h") --move left
vim.keymap.set({"n","v","o"}, "t", "j") --move down
vim.keymap.set({"n","v","o"}, "n", "k") --move up
vim.keymap.set({"n","v","o"}, "s", "l") --move right
vim.keymap.set({"n","v","o"}, "l", "n") --next
vim.keymap.set({"n","v","o"}, "L", "N") --last
vim.keymap.set("n", "<A-s>", ":wincmd l<cr>")
vim.keymap.set("n", "<A-n>", ":wincmd k<cr>")
vim.keymap.set("n", "<A-t>", ":wincmd j<cr>")
vim.keymap.set("n", "<A-h>", ":wincmd h<cr>")

View File

@ -64,10 +64,16 @@
require("mason").setup()
require("mason-lspconfig").setup()
-- Set up lspconfig.
local capabilities = require('cmp_nvim_lsp').default_capabilities()
-- Replace <YOUR_LSP_SERVER> with each lsp server you've enabled.
--
require("mason-lspconfig").setup({
ensure_installed = { "lua_ls" }
})
require('lspconfig')['clangd'].setup {
capabilities = capabilities
}
@ -80,3 +86,13 @@
require('lspconfig')['bashls'].setup {
capabilities = capabilities
}
require('lspconfig')['rust_analyzer'].setup {
capabilities = capabilities
}
require('lspconfig')['arduino_language_server'].setup {
cmd = {"arduino-language-server",
"-fqbn", "arduino:avr:mega",
"-cli", "arduino-cli",
"-clangd", "clangd",
"-cli-config", "$HOME/.arduino15/arduino-cli.yaml"}
}

View File

@ -1,17 +1,26 @@
local plugins = {
-- {{{ lsp stuff
-- {{{ basic lsp
-- {{{ lsp
-- {{{ basic lsp stuff
{
"neovim/nvim-lspconfig",
event = "VeryLazy",
event = "VeryLazy",
dependencies = {
"hrsh7th/cmp-nvim-lsp",
"hrsh7th/cmp-buffer",
"hrsh7th/cmp-path",
"hrsh7th/cmp-cmdline",
event = "VeryLazy"
}
}, -- }}}
{
"hrsh7th/cmp-nvim-lsp",
"hrsh7th/cmp-buffer",
"hrsh7th/cmp-path",
"hrsh7th/cmp-cmdline",
},
},
},
{
"williamboman/mason-lspconfig.nvim",
event = "VeryLazy",
dependencies = {
"williamboman/mason.nvim"
}
},-- }}}
-- {{{ snipplets
{
@ -38,7 +47,6 @@ local plugins = {
"folke/which-key.nvim",
event = "VeryLazy",
init = function()
lazy = true
vim.o.timeout = true
vim.o.timeoutlen = 0
require("which-key").setup(opts)
@ -65,7 +73,7 @@ local plugins = {
--better borders for split screen
{
"nvim-zh/colorful-winsep.nvim",
event = "VeryLazy",
event = "WinNew",
config = function ()
require('colorful-winsep').setup()
end