mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-07-14 03:14:38 +02:00
feat(extras): added fzf-lua (#3555)
New extra with an initial implementation of fzf-lua. ## Todo - [x] check all places that currently depend on telescope and provide an alternative or disable - [x] disable telescope spec completely. (currently only removed its keymaps) - [x] trouble integration - [x] https://github.com/ibhagwan/fzf-lua/issues/1241 --------- Co-authored-by: Iordanis Petkakis <12776461+dpetka2001@users.noreply.github.com>
This commit is contained in:
parent
caaa6c440d
commit
6ab404134d
7 changed files with 320 additions and 65 deletions
|
@ -168,13 +168,14 @@ end
|
|||
-- * lsp root_dir
|
||||
-- * root pattern of filename of the current buffer
|
||||
-- * root pattern of cwd
|
||||
---@param opts? {normalize?:boolean}
|
||||
---@param opts? {normalize?:boolean, buf?:number}
|
||||
---@return string
|
||||
function M.get(opts)
|
||||
local buf = vim.api.nvim_get_current_buf()
|
||||
opts = opts or {}
|
||||
local buf = opts.buf or vim.api.nvim_get_current_buf()
|
||||
local ret = M.cache[buf]
|
||||
if not ret then
|
||||
local roots = M.detect({ all = false })
|
||||
local roots = M.detect({ all = false, buf = buf })
|
||||
ret = roots[1] and roots[1].paths[1] or vim.uv.cwd()
|
||||
M.cache[buf] = ret
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue