1
0
Fork 0

nvim: use projections for project switching

This commit is contained in:
tastytea 2022-11-21 14:26:27 +01:00
parent d43331492e
commit 4a7f2d8f2f
Signed by: tastytea
SSH Key Fingerprint: SHA256:FBkvrOlhq5use1XEttyUGT4bUTDVA1ar9SgIc9P03cM
3 changed files with 8 additions and 12 deletions

View File

@ -23,12 +23,6 @@ require('luasnip.loaders.from_lua').load({
paths = vim.fn.stdpath('config') .. '/snippets'
})
-- require('project_nvim').setup({
-- detection_methods = { 'pattern', 'lsp' },
-- patterns = require('my.functions').project_root_markers,
-- show_hidden = false,
-- fallback_buffer_dir = true
-- })
-- icons for diagnostics in the symbol column
local signs = { Error = "", Warn = "", Hint = "", Info = "" }
@ -95,3 +89,8 @@ require('nvim-dap-virtual-text').setup({})
require('femaco').setup({})
map('n', '<Leader>E', require('femaco.edit').edit_code_block,
'Edit inline code block')
require('projections').setup({
workspaces = { '~/Projekte', '~/Dokumente' },
patterns = require('my.functions').project_root_markers
})

View File

@ -169,10 +169,7 @@ require('packer').startup({ function(use)
}
use { 'https://github.com/windwp/nvim-autopairs' }
use { 'https://github.com/L3MON4D3/LuaSnip' }
-- -- use { 'https://github.com/ahmedkhalf/project.nvim' }
-- use { -- <https://github.com/ahmedkhalf/project.nvim/pull/89>
-- 'https://github.com/tastytea/project.nvim',
-- branch = 'fallback_current_dir' }
use { 'https://github.com/GnikDroy/projections.nvim' }
use {
'https://github.com/mfussenegger/nvim-dap',
tag = '*'

View File

@ -3,7 +3,7 @@ require('which-key').setup({})
local map = require('my.functions').map
local telescope = require('telescope')
local t_actions = require('telescope.actions')
-- telescope.load_extension('projects')
telescope.load_extension('projections')
telescope.load_extension('dap')
telescope.load_extension('fzf')
@ -43,7 +43,7 @@ map('n', '<Leader>tm', t_builtin.man_pages, 'Man pages')
map('n', '<Leader>tr', t_builtin.registers, 'Registers')
map('n', '<Leader>gh', t_builtin.git_bcommits, 'History of this file')
map('n', '<F7>', t_builtin.diagnostics, 'Show diagnostics')
-- map('n', '<Leader>tp', telescope.extensions.projects.projects, 'Projects')
map('n', '<Leader>tp', telescope.extensions.projections.projections, 'Projects')
map('n', '<Leader>tt',
require("telescope._extensions.todo-comments").exports.todo,
'Display TODO comments in project')