diff --git a/init.lua b/init.lua index 1d5a84a..34d4f69 100644 --- a/init.lua +++ b/init.lua @@ -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 "" } diff --git a/lua/config/bindings.lua b/lua/config/bindings.lua index c288806..3a8bf46 100644 --- a/lua/config/bindings.lua +++ b/lua/config/bindings.lua @@ -23,6 +23,17 @@ vim.keymap.set("t", "", "") --exit terminal mode with esc vim.keymap.set("n", "", ":tabnew | terminal htop") --open htop in new tab vim.keymap.set("n", "", ":tabnew | terminal termusic") --open termusic (a music player) in new tab vim.keymap.set("n", "", ":tabnew | terminal gomuks") --open gomuks (a matrix client) in new tab -vim.keymap.set("n", "", ":tabnew | terminal ranger") --open ranger (a file manager) in new tab vim.keymap.set("n", "", ":split new") --create a new split vim.keymap.set("n", "", ":vs new") --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", "", ":wincmd l") +vim.keymap.set("n", "", ":wincmd k") +vim.keymap.set("n", "", ":wincmd j") +vim.keymap.set("n", "", ":wincmd h") diff --git a/lua/config/lsp-config.lua b/lua/config/lsp-config.lua index 3cda0cb..a69fcfc 100644 --- a/lua/config/lsp-config.lua +++ b/lua/config/lsp-config.lua @@ -64,10 +64,16 @@ + require("mason").setup() + require("mason-lspconfig").setup() -- Set up lspconfig. local capabilities = require('cmp_nvim_lsp').default_capabilities() -- Replace 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"} + } diff --git a/lua/plugins.lua b/lua/plugins.lua index e17a48f..53522e9 100644 --- a/lua/plugins.lua +++ b/lua/plugins.lua @@ -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