diff --git a/init.lua b/init.lua index c5b67cb..b58786b 100644 --- a/init.lua +++ b/init.lua @@ -1,3 +1,5 @@ +vim.g.mapleader = " " + require("config.lazy") require("mason").setup() @@ -5,9 +7,9 @@ require("mason-lspconfig").setup({ ensure_installed = { "pylsp", "clangd", - "gopls", - -- "dcm", "ols", + "ts_ls", + "vue_ls" }, }) @@ -24,13 +26,31 @@ vim.cmd([[colorscheme everforest]]) -- My custom keybinds -- vim.keymap.set("n", "x", "source %") -- Can't do this with lazy.nvim apparently -vim.keymap.set("n", "x", ":.lua") -vim.keymap.set("v", "x", ":lua") +vim.keymap.set("n", "x", ":.lua") +vim.keymap.set("v", "x", ":lua") vim.api.nvim_set_keymap('t', '', [[]], {noremap = true}) +-- vim.api.nvim_set_keymap('i', '', [[]], {noremap = true}) -local lspconfig = require('lspconfig') -lspconfig.pylsp.setup{} -lspconfig.clangd.setup{} -lspconfig.gopls.setup{} ---lspconfig.dcm.setup{} -lspconfig.ols.setup{} +-- Harpoon Setup and Settings +local harpoon = require("harpoon") +harpoon:setup() +vim.keymap.set("n", "n", function() harpoon:list():add() end) +vim.keymap.set("n", "h", function() harpoon.ui:toggle_quick_menu(harpoon:list()) end) +vim.keymap.set("n", "d", function() harpoon:list():remove() end) +vim.keymap.set("n", "j", function() harpoon:list():select(1) end) +vim.keymap.set("n", "k", function() harpoon:list():select(2) end) +vim.keymap.set("n", "l", function() harpoon:list():select(3) end) +vim.keymap.set("n", ";", function() harpoon:list():select(4) end) + + +--local lspconfig = require('lspconfig') +local lspconfig = vim.lsp.config +local lspenable = vim.lsp.enable +lspconfig("ts_ls", { + filetypes = {'js', 'ts', 'vue'}, +}) +lspenable("pylsp") +lspenable("clangd") +lspenable("ols") +lspenable("ts_ls") +lspenable("vue_ls") diff --git a/lua/config/lazy.lua b/lua/config/lazy.lua index bb44a52..fda5bde 100644 --- a/lua/config/lazy.lua +++ b/lua/config/lazy.lua @@ -11,4 +11,4 @@ if not vim.loop.fs_stat(lazypath) then end vim.opt.rtp:prepend(lazypath) -require("lazy").setup("plugins") +require("lazy").setup("plugins") diff --git a/lua/plugins/firenvim.lua b/lua/plugins/firenvim.lua new file mode 100644 index 0000000..4dfcdb0 --- /dev/null +++ b/lua/plugins/firenvim.lua @@ -0,0 +1 @@ +return { 'glacambre/firenvim', build = ":call firenvim#install(0)" } diff --git a/lua/plugins/harpoon.lua b/lua/plugins/harpoon.lua new file mode 100644 index 0000000..204f183 --- /dev/null +++ b/lua/plugins/harpoon.lua @@ -0,0 +1,5 @@ +return {{ + "ThePrimeagen/harpoon", + branch = "harpoon2", + dependencies = { "nvim-lua/plenary.nvim" } +}}