2 Commits

Author SHA1 Message Date
c0adfd43a1 configure harpoon to use telescope 2024-07-30 14:49:49 +03:00
69067d5410 add helm-ls 2024-07-30 14:49:43 +03:00
3 changed files with 34 additions and 3 deletions

View File

@@ -37,5 +37,6 @@
"undotree": { "branch": "master", "commit": "56c684a805fe948936cda0d1b19505b84ad7e065" },
"vim-be-good": { "branch": "master", "commit": "4fa57b7957715c91326fcead58c1fa898b9b3625" },
"vim-fugitive": { "branch": "master", "commit": "d0c1a437536778bcc8174b7cb2ffdf98f611e6fe" },
"vim-gitgutter": { "branch": "main", "commit": "e801371917e52805a4ceb1e93f55ed1fba712f82" }
"vim-gitgutter": { "branch": "main", "commit": "e801371917e52805a4ceb1e93f55ed1fba712f82" },
"vim-helm": { "branch": "master", "commit": "ae1ebc160d2b9b90108477ab10df7a4fc501e358" }
}

View File

@@ -7,8 +7,27 @@ return {
harpoon:setup()
-- basic telescope configuration
local conf = require("telescope.config").values
local function toggle_telescope(harpoon_files)
local file_paths = {}
for _, item in ipairs(harpoon_files.items) do
table.insert(file_paths, item.value)
end
require("telescope.pickers").new({}, {
prompt_title = "Harpoon",
finder = require("telescope.finders").new_table({
results = file_paths,
}),
previewer = conf.file_previewer({}),
sorter = conf.generic_sorter({}),
}):find()
end
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", "<C-e>", function() toggle_telescope(harpoon:list()) end,
{ desc = "Open harpoon window" })
vim.keymap.set("n", "<C-h>", function() harpoon:list():select(1) end)
vim.keymap.set("n", "<C-j>", function() harpoon:list():select(2) end)
@@ -16,3 +35,4 @@ return {
vim.keymap.set("n", "<C-l>", function() harpoon:list():select(4) end)
end
}

View File

@@ -13,6 +13,7 @@ return {
"L3MON4D3/LuaSnip",
"j-hui/fidget.nvim",
"rafamadriz/friendly-snippets",
{ 'towolf/vim-helm', ft = 'helm' },
},
config = function()
@@ -29,7 +30,7 @@ return {
require('mason-lspconfig').setup({
-- Replace the language servers listed here
-- with the ones you want to install
ensure_installed = { 'tsserver', 'lua_ls', 'gopls', 'pylsp', 'gitlab_ci_ls', 'yamlls', 'ansiblels', 'terraformls' },
ensure_installed = { 'tsserver', 'lua_ls', 'gopls', 'pylsp', 'gitlab_ci_ls', 'yamlls', 'ansiblels', 'terraformls', 'helm_ls' },
handlers = {
function(server_name)
require('lspconfig')[server_name].setup({})
@@ -137,6 +138,15 @@ return {
Lua = {}
}
}
lspconfig.helm_ls.setup {
settings = {
['helm-ls'] = {
yamlls = {
path = "yaml-language-server",
}
}
}
}
end
}