Compare commits

..

2 Commits

Author SHA1 Message Date
cea3b64888 Add harpoon 2026-02-19 17:11:31 +01:00
87f0ad2936 Add haskell language server 2026-02-17 23:29:56 +01:00
5 changed files with 33 additions and 2 deletions

View File

@ -3,6 +3,7 @@
"catppuccin": { "branch": "main", "commit": "beaf41a30c26fd7d6c386d383155cbd65dd554cd" }, "catppuccin": { "branch": "main", "commit": "beaf41a30c26fd7d6c386d383155cbd65dd554cd" },
"cmp-nvim-lsp": { "branch": "main", "commit": "cbc7b02bb99fae35cb42f514762b89b5126651ef" }, "cmp-nvim-lsp": { "branch": "main", "commit": "cbc7b02bb99fae35cb42f514762b89b5126651ef" },
"gruvbox.nvim": { "branch": "main", "commit": "a472496e1a4465a2dd574389dcf6cdb29af9bf1b" }, "gruvbox.nvim": { "branch": "main", "commit": "a472496e1a4465a2dd574389dcf6cdb29af9bf1b" },
"harpoon": { "branch": "harpoon2", "commit": "87b1a3506211538f460786c23f98ec63ad9af4e5" },
"lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" }, "lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
"lualine.nvim": { "branch": "master", "commit": "47f91c416daef12db467145e16bed5bbfe00add8" }, "lualine.nvim": { "branch": "master", "commit": "47f91c416daef12db467145e16bed5bbfe00add8" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "80c0130c5f16b551865a69e832f1feadeedb5fbe" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "80c0130c5f16b551865a69e832f1feadeedb5fbe" },

View File

@ -3,7 +3,7 @@ vim.keymap.set("n", "<leader>w", ":w<CR>")
vim.keymap.set("n", "<leader>q", ":q<CR>") vim.keymap.set("n", "<leader>q", ":q<CR>")
-- Clear search highlight -- Clear search highlight
vim.keymap.set("n", "<leader>h", ":nohlsearch<CR>") vim.keymap.set("n", "<leader>c", ":nohlsearch<CR>")
-- Better window navigation -- Better window navigation
vim.keymap.set("n", "<C-h>", "<C-w>h") vim.keymap.set("n", "<C-h>", "<C-w>h")

View File

@ -20,6 +20,7 @@ vim.opt.rtp:prepend(lazypath)
local plugins = { local plugins = {
require("plugins.colorschemes"), -- theme require("plugins.colorschemes"), -- theme
require("plugins.editing"), -- editing require("plugins.editing"), -- editing
require("plugins.harpoon"), -- harpoon
require("plugins.lsp"), -- LSP require("plugins.lsp"), -- LSP
require("plugins.telescope"), -- fuzzy finder require("plugins.telescope"), -- fuzzy finder
require("plugins.treesitter"), -- syntax tree require("plugins.treesitter"), -- syntax tree

23
lua/plugins/harpoon.lua Normal file
View File

@ -0,0 +1,23 @@
return {
"ThePrimeagen/harpoon",
branch = "harpoon2",
dependencies = {
"nvim-lua/plenary.nvim",
},
-- lazy = false, -- load immediately
config = function()
local harpoon = require("harpoon")
harpoon:setup()
vim.keymap.set("n", "<leader>a", function() harpoon:list():add() end)
vim.keymap.set("n", "<C-e>", function() harpoon.ui:toggle_quick_menu(harpoon:list()) end)
vim.keymap.set("n", "<leader>h", function() harpoon:list():select(1) end)
vim.keymap.set("n", "<leader>j", function() harpoon:list():select(2) end)
vim.keymap.set("n", "<leader>k", function() harpoon:list():select(3) end)
vim.keymap.set("n", "<leader>l", function() harpoon:list():select(4) end)
end,
}

View File

@ -36,9 +36,15 @@ return {
vim.lsp.config("rust_analyzer", {}) vim.lsp.config("rust_analyzer", {})
vim.lsp.enable("rust_analyzer") vim.lsp.enable("rust_analyzer")
-- Haskell
vim.lsp.config('hls', {
filetypes = { 'haskell', 'lhaskell', 'cabal' },
})
vim.lsp.enable('hls')
-- Auto format -- Auto format
vim.api.nvim_create_autocmd("BufWritePre", { vim.api.nvim_create_autocmd("BufWritePre", {
pattern = "*.rs", pattern = {"*.rs", "*.hs"},
callback = function() callback = function()
vim.lsp.buf.format({ async = false }) vim.lsp.buf.format({ async = false })
end, end,