Merge pull request #1 from andrei-debono-deel/master

Adds harpoon and TSC memory limit
This commit is contained in:
Andrei Debono 2025-03-01 14:13:24 +01:00 committed by GitHub
commit 294751108c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 104 additions and 6 deletions

View File

@ -379,11 +379,15 @@ require('lazy').setup({
'-g',
'!**/node_modules/*',
'-g',
'!**/dist/*',
'-g',
'!**/.git/*',
'-g',
'!**/build/*',
'-g',
'!**/vendor/*',
'-g',
'!**/results/*',
},
},
},
@ -604,7 +608,7 @@ require('lazy').setup({
-- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/
local servers = {
-- clangd = {},
gopls = {},
-- gopls = {},
templ = {
filetypes = { 'html', 'templ' },
},
@ -623,13 +627,29 @@ require('lazy').setup({
-- https://github.com/pmizio/typescript-tools.nvim
--
-- But for many setups, the LSP (`tsserver`) will work just fine
tsserver = {
ts_ls = {
init_options = {
maxTsServerMemory = 8192,
},
commands = {
OrganizeImports = {
organize_imports,
description = 'Organize Imports',
},
},
on_exit = function(_, code)
if code ~= 0 then
-- Restart tsserver if it exits with a non-zero exit code
vim.lsp.start_client {
name = 'tsserver',
cmd = { 'typescript-language-server', '--stdio' },
}
end
end,
flags = {
debounce_text_changes = 150,
},
},
lua_ls = {
@ -681,7 +701,7 @@ require('lazy').setup({
{
'mistricky/codesnap.nvim',
build = 'make build_generator',
build = 'make',
keys = {
{ '<leader>cc', '<CMD>CodeSnap<CR>', mode = 'x', desc = 'Save selected code snapshot into clipboard' },
{ '<leader>cs', '<CMD>CodeSnapSave<CR>', mode = 'x', desc = 'Save selected code snapshot into ~/Pictures' },
@ -867,7 +887,12 @@ require('lazy').setup({
},
-- Highlight todo, notes, etc in comments
{ 'folke/todo-comments.nvim', event = 'VimEnter', dependencies = { 'nvim-lua/plenary.nvim' }, opts = { signs = false } },
{
'folke/todo-comments.nvim',
event = 'VimEnter',
dependencies = { 'nvim-lua/plenary.nvim' },
opts = { signs = false },
},
{ -- Collection of various small independent plugins/modules
'echasnovski/mini.nvim',
@ -910,7 +935,20 @@ require('lazy').setup({
'nvim-treesitter/nvim-treesitter',
build = ':TSUpdate',
opts = {
ensure_installed = { 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'markdown_inline', 'query', 'vim', 'vimdoc', 'templ' },
ensure_installed = {
'bash',
'c',
'diff',
'html',
'lua',
'luadoc',
'markdown',
'markdown_inline',
'query',
'vim',
'vimdoc',
'templ',
},
-- Autoinstall languages that are not installed
auto_install = true,
highlight = {
@ -964,7 +1002,7 @@ require('lazy').setup({
--
-- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going.
-- For additional information, see `:help lazy.nvim-lazy.nvim-structuring-your-plugins`
-- { import = 'custom.plugins' },
{ import = 'custom.plugins' },
}, {
ui = {
-- If you are using a Nerd Font: set icons to an empty table which will use the

32
lazy-lock.json Normal file
View File

@ -0,0 +1,32 @@
{
"LuaSnip": { "branch": "master", "commit": "c9b9a22904c97d0eb69ccb9bab76037838326817" },
"catppuccin": { "branch": "main", "commit": "7ab1a6ec70a664ecb95d84669efc20aaf4f4ed1b" },
"cmp-nvim-lsp": { "branch": "main", "commit": "99290b3ec1322070bcfb9e846450a46f6efa50f0" },
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
"cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" },
"codesnap.nvim": { "branch": "main", "commit": "6400480aa6cc366cbd931146c429aaa64680dab9" },
"conform.nvim": { "branch": "master", "commit": "a6f5bdb78caa305496357d17e962bbc4c0b392e2" },
"fidget.nvim": { "branch": "main", "commit": "d9ba6b7bfe29b3119a610892af67602641da778e" },
"gitsigns.nvim": { "branch": "main", "commit": "4c40357994f386e72be92a46f41fc1664c84c87d" },
"harpoon": { "branch": "master", "commit": "1bc17e3e42ea3c46b33c0bbad6a880792692a1b3" },
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
"lazydev.nvim": { "branch": "main", "commit": "2367a6c0a01eb9edb0464731cc0fb61ed9ab9d2c" },
"luvit-meta": { "branch": "main", "commit": "1df30b60b1b4aecfebc785aa98943db6c6989716" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "1a31f824b9cd5bc6f342fc29e9a53b60d74af245" },
"mason-tool-installer.nvim": { "branch": "main", "commit": "5639d58a3d11ff7c05c8e31e159bfedae55d7961" },
"mason.nvim": { "branch": "main", "commit": "fc98833b6da5de5a9c5b1446ac541577059555be" },
"mini.nvim": { "branch": "main", "commit": "e554890210cd29d017d6a0c1b1a46f995dcf9e64" },
"nvim-cmp": { "branch": "main", "commit": "5a11682453ac6b13dbf32cd403da4ee9c07ef1c3" },
"nvim-lspconfig": { "branch": "master", "commit": "5344e00b86d1ea50c39a1da8af9f3d197234bcfe" },
"nvim-treesitter": { "branch": "master", "commit": "89eed3572d041c423d14f9ac94086723b338b853" },
"nvim-web-devicons": { "branch": "master", "commit": "1020869742ecb191f260818234517f4a1515cfe8" },
"plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "2a5ceff981501cff8f46871d5402cd3378a8ab6a" },
"telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
"telescope.nvim": { "branch": "0.1.x", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" },
"todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" },
"undotree": { "branch": "master", "commit": "2556c6800b210b2096b55b66e74b4cc1d9ebbe4f" },
"vim-fugitive": { "branch": "master", "commit": "4a745ea72fa93bb15dd077109afbb3d1809383f2" },
"vim-sleuth": { "branch": "master", "commit": "be69bff86754b1aa5adcbb527d7fcd1635a84080" },
"which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" }
}

View File

@ -0,0 +1,28 @@
-- lua/custom/plugins/harpoon.lua
return {
'ThePrimeagen/harpoon',
dependencies = { 'nvim-lua/plenary.nvim' },
config = function()
local harpoon = require 'harpoon'
harpoon.setup {}
local mark = require 'harpoon.mark'
local ui = require 'harpoon.ui'
-- Harpoon keybinds
vim.keymap.set('n', '<leader>a', mark.add_file, { desc = 'Add file to Harpoon' })
vim.keymap.set('n', '<C-e>', ui.toggle_quick_menu, { desc = 'Toggle Harpoon menu' })
vim.keymap.set('n', '<leader>1', function()
ui.nav_file(1)
end, { desc = 'Go to Harpoon file 1', noremap = true })
vim.keymap.set('n', '<leader>2', function()
ui.nav_file(2)
end, { desc = 'Go to Harpoon file 2', noremap = true })
vim.keymap.set('n', '<leader>3', function()
ui.nav_file(3)
end, { desc = 'Go to Harpoon file 3', noremap = true })
vim.keymap.set('n', '<leader>4', function()
ui.nav_file(4)
end, { desc = 'Go to Harpoon file 4', noremap = true })
end,
}