Giter VIP home page Giter VIP logo

neorg-telescope's People

Contributors

anakojm avatar benlubas avatar champignoom avatar d-r-a-b avatar danymat avatar github-actions[bot] avatar kashelkin avatar kkharji avatar max397574 avatar metalelf0 avatar mrcjkb avatar mrossinek avatar pysan3 avatar sibevin avatar taeruh avatar tj-adams avatar vhyrro avatar zdcthomas avatar znschaffer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

neorg-telescope's Issues

Global heading search

So, currently Neorg-telescope offers a method to search through headings in the currently open buffer. What might be good to have might be a way to search through headings in all files in the workspace.

In general, that goes for most of the neorg telescope commands. Buffer -> Workspace -> All workspaces. I am a bit new to Lua/Neovim, but would be willing to give it a shot. But want to open a discussion first before opening a PR for it.

[Feature Request] Possibility to search using metadata

It would be very nice to have a way to find every file with a given tag, author, description or date

We would have to search in each document in the current workspace (or even across workspace maybe ?) for every key-value pair (it already have detailed parsing with treesitter so I suppose it wouldn't be too complex)

Searching in a wiki would be eased a lot

No content when using `telescope neorg find_norg_files`

Here's a video demonstrating the issue.

2023-03-06.08-29-04.mp4

So what's going on here is that after I run \li which is this

Map("n", "<LocalLeader>li", function() 
  vim.cmd("Neorg workspace notes")
  vim.cmd("Neorg index")
end, {})

Then I'd run \ff which uses the neorg telescope extension to find all neorg files. Map("n", "<LocalLeader>ff", ":Telescope neorg find_norg_files<CR>", {}). Problem is, this doesn't actually do what it's supposed to. It runs telescope fine, I can select any file in my workspace folder. But, for some reason the files have no content. Unless, I manualy go to those files using links.

Extra characters on inserting link

After inserting the link I'm getting extra characters appended hf]a after the complete link like this:

{:$/misc:* Things to read}[Things to read]hf]a

Telescope neorg find_linkable did not found links

plugin versions

  • nvim 0.9.0
  • neorg b725a58
  • neorg-telescope 7d9f893
  • telescope 6258d50

telescope neorg find_linkable can not found any links also telescope neorg insert_link excuting nil error.
I tested it 1.0-specification.norg file, core.dirman can found my workdir and telescope neorg search_headings and find_norg_files are collectly work.

diffculty setting up Neorg telescope in nixos: "Command.lua:184 :attempt to call a nil value

Hello. I'm trying to set up neorg-telescope on neovim nightly 0.7.0-dev on nixos, using home-manager (which relies on packer). However when I try to run it with :Telescope neorg, I get these sets of errors.
image

more info:

versions:

Neovim =

NVIM v0.7.0-dev
Build type: Release
LuaJIT 2.1.0-beta3
Compiled by nixbld

Features: +acl +iconv +tui
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "
/nix/store/f0pxmjc6m4hd2m5kwqazai8p9j730cb2-neovim-unwrapped-master/share/nvim
"

nixos = 22.05
kitty = 0.23.1
zsh = 5.8
probably relevant parts of :checkhealth:

nvim-treesitter: require("nvim-treesitter.health").check()
========================================================================
## Installation
  - OK: `tree-sitter` found  0.20.0 (parser generator, only needed for :TSInstallFromGrammar)
  - OK: `node` found v14.18.1 (only needed for :TSInstallFromGrammar)
  - OK: `git` executable found.
  - OK: `cc` executable found. Selected from { vim.NIL, "cc", "gcc", "clang", "cl", "zig" }
    Version: gcc (GCC) 10.3.0
  - OK: Neovim was compiled with tree-sitter runtime ABI version 13 (required >=13). Parsers must be compatible with runtime ABI.

neorg-telescope used =

nvim-neorg-telescope = pkgs.vimUtils.buildVimPlugin {
    name = "neorg-telescope";
    src = fetchFromGitHub {
      "owner" = "nvim-neorg";
      "repo" = "neorg-telescope";
      "rev" = "d6089ba3c1bc8a3c5ce854ce58c6cad42c8de60a";
      "sha256" = "T2SJA7vnEoPlJAnT6AHd05BIGgdlUihwa0GaQ2HPrMU=";
      "fetchSubmodules" = true;
    };
  };

setup

neorg.lua

require('neorg').setup {
    load = {
        ["core.defaults"] = {},
        ["core.keybinds"] = {
          config = {
            default_keybinds = true,
            neorg_leader = "<Leader>n"
          }
        },
        ["core.norg.completion"] = {
          config = {
            engine = "nvim-cmp"
          }
        },
        ["core.norg.concealer"] = {
          config = {
            icons = {
              todo = {
                enabled = true,
                done = {
                    enabled = true,

                    icon = ""
                },
                pending = {
                    enabled = true,
                    icon = ""
                },
                undone = {
                    enabled = true,
                    icon = "×"
                }
              }
            }
          }
        },
        ["core.norg.dirman"] = {
            config = {
                workspaces = {
                    torc = "~/neorg"
                }
            }
        },
        ["core.integrations.telescope"] = {}
    },
}

telescope.lua

vim.cmd("packadd telescope.nvim")
vim.cmd("packadd telescope-symbols.nvim")

--vim.cmd 'packadd telescope-vimwiki.nvim'
--vim.cmd 'packadd telescope-fzf-native.nvim'
--vim.cmd 'packadd telescope-vim-bookmarks.nvim'
--vim.cmd 'packadd telescope-project.nvim'
--vim.cmd 'packadd telescope-lsp-handlers.nvim'
--vim.cmd 'packadd telescope-neoclip.nvim'
--vim.cmd 'packadd telescope-zoxide.nvim'
--vim.cmd 'packadd telescope-arecibo.nvim'
--vim.cmd 'packadd telescope-bibtex.nvim'

local status_ok, telescope = pcall(require, "telescope")
if not status_ok then
	return
end
require("telescope").load_extension("vimwiki")
require("telescope").load_extension("arecibo")
require("telescope").load_extension("bibtex")
require("telescope").load_extension("neorg")
local actions = require("telescope.actions")
telescope.setup({
	defaults = {

		prompt_prefix = " ",
		selection_caret = " ",
		path_display = { "smart" },

		mappings = {
			i = {
				["<C-n>"] = actions.cycle_history_next,
				["<C-p>"] = actions.cycle_history_prev,

				["<C-j>"] = actions.move_selection_next,
				["<C-k>"] = actions.move_selection_previous,

				["<C-c>"] = actions.close,

				["<Down>"] = actions.move_selection_next,
				["<Up>"] = actions.move_selection_previous,

				["<CR>"] = actions.select_default,
				["<C-x>"] = actions.select_horizontal,
				["<C-v>"] = actions.select_vertical,
				["<C-t>"] = actions.select_tab,

				["<C-u>"] = actions.preview_scrolling_up,
				["<C-d>"] = actions.preview_scrolling_down,

				["<PageUp>"] = actions.results_scrolling_up,
				["<PageDown>"] = actions.results_scrolling_down,

				["<Tab>"] = actions.toggle_selection + actions.move_selection_worse,
				["<S-Tab>"] = actions.toggle_selection + actions.move_selection_better,
				["<C-q>"] = actions.send_to_qflist + actions.open_qflist,
				["<M-q>"] = actions.send_selected_to_qflist + actions.open_qflist,
				["<C-l>"] = actions.complete_tag,
				["<C-_>"] = actions.which_key, -- keys from pressing <C-/>
			},

			n = {
				["<esc>"] = actions.close,
				["<CR>"] = actions.select_default,
				["<C-x>"] = actions.select_horizontal,
				["<C-v>"] = actions.select_vertical,
				["<C-t>"] = actions.select_tab,

				["<Tab>"] = actions.toggle_selection + actions.move_selection_worse,
				["<S-Tab>"] = actions.toggle_selection + actions.move_selection_better,
				["<C-q>"] = actions.send_to_qflist + actions.open_qflist,
				["<M-q>"] = actions.send_selected_to_qflist + actions.open_qflist,

				["j"] = actions.move_selection_next,
				["k"] = actions.move_selection_previous,
				["H"] = actions.move_to_top,
				["M"] = actions.move_to_middle,
				["L"] = actions.move_to_bottom,

				["<Down>"] = actions.move_selection_next,
				["<Up>"] = actions.move_selection_previous,
				["gg"] = actions.move_to_top,
				["G"] = actions.move_to_bottom,

				["<C-u>"] = actions.preview_scrolling_up,
				["<C-d>"] = actions.preview_scrolling_down,

				["<PageUp>"] = actions.results_scrolling_up,
				["<PageDown>"] = actions.results_scrolling_down,

				["?"] = actions.which_key,
			},
		},
	},
	pickers = {
		-- Default configuration for builtin pickers goes here:
		-- picker_name = {
		--   picker_config_key = value,
		--   ...
		-- }
		-- Now the picker_config_key will be applied every time you call this
		-- builtin picker
		file_browser = {
			theme = "ivy",
			previewer = false,
		},
	},
	extensions = {
		-- Your extension configuration goes here:
		--

		-- extension_name = {

		--   extension_config_key = value,

		-- }

		-- please take a look at the readme of the extension you want to configure
		bibtex = {
			depth = 1,
			--custom_formats = {
			--  {id = 'myCoolFormat', cite_marker = '#%s#'}
			--},
			format = "markdown",
			-- global_files = { 'path/to/my/bib/file.bib', 'path/to/my/bib/directory' },
			search_keys = { "label", "author", "publisher" },
		},
		arecibo = {

			["selected_engine"] = "google",

			["url_open_command"] = "xdg-open",

			["show_http_headers"] = false,

			["show_domain_icons"] = false,
		},
	},
}

other plugins and home-manager setup

  package = pkgs.neovim-nightly;
  viAlias = true;
  vimAlias = true;
  vimdiffAlias = true;
  plugins = with pkgs.vimPlugins; [
    vim-pencil
    vim-surround
    FixCursorHold-nvim
    vim-markdown
    project-nvim
    popup-nvim
    plenary-nvim
    neorg
    orgmode
    vimwiki
    nvim-autopairs
    comment-nvim
    nvim-web-devicons
    nvim-tree-lua
    bufferline-nvim
    vim-bbye
    lualine-nvim
    toggleterm-nvim
    indent-blankline-nvim
    which-key-nvim

    ## colorschemes
    gruvbox

    ## cmp plugins
    nvim-cmp
    cmp-path
    cmp-buffer
    cmp-spell
    cmp-emoji
    cmp-cmdline
    cmp_luasnip
    cmp-nvim-lua
    cmp-nvim-lsp
    cmp-nvim-lsp-document-symbol
    cmp-latex-symbols
    cmp-pandoc-references
    cmp-vimwiki-tags

    ## snippets
    luasnip
    friendly-snippets

    ## LSP
    nvim-lspconfig
    nlsp-settings-nvim
    null-ls-nvim
    nvim-compe

    ## fzf
    fzf-vim

    ## telescope
    telescope-nvim
    telescope-fzf-native-nvim
    telescope-vim-bookmarks-nvim
    telescope-symbols-nvim
    telescope-project-nvim
    telescope-lsp-handlers-nvim
    telescope-vimwiki-nvim
    telescope-neoclip-nvim
    telescope-zoxide-nvim
    telescope-arecibo-nvim
    telescope-bibtex-nvim
    nvim-neorg-telescope


    ## treesitter
    (nvim-treesitter.withPlugins (plugins: pkgs.tree-sitter.allGrammars))

    ## git
    gitsigns-nvim
    vim-fugitive
    vim-gitgutter

    ##nix
    vim-nix
    
  ];
  extraConfig = ''
    luafile ~/dotfiles/user/nvim/import.lua
  '';
  extraPackages = with pkgs; [
    nodePackages.vscode-langservers-extracted
    nodePackages.vim-language-server
    nodePackages.yaml-language-server
    nodePackages.bash-language-server
    nodePackages.prettier
    nodePackages.eslint
    nodePackages.pyright # python language server... ironically!
    nodePackages.stylelint
    (luajit.withPackages(ps: with ps; [ busted lua-lsp luafilesystem ]))
    tree-sitter
    efm-langserver
    stylua
    rnix-lsp
    shfmt
    sumneko-lua-language-server
    nixfmt
    neovide
    shellcheck
    html-tidy
    languagetool
    neovim-remote
    gcc # needed for nvim-treesitter
    csslint
  ];

Please tell me if I should provide more information. Thanks for your great work!

core.integrations.telescope.insert_link() just pastes the function call into file instead of opening telescope

Relevant bits of config below:

require("neorg").setup({
	-- Tell Neorg what modules to load
	load = {
		["core.defaults"] = {}, -- Load all the default modules
		["core.gtd.base"] = { },
		["core.integrations.telescope"] = {}, -- Enable the telescope module
		["core.export"] = {}, -- Enable the truezen module
		["core.export.markdown"] = {}, -- Enable the truezen module
		["core.norg.completion"] = { config = { engine = "nvim-cmp" } }, -- We current support nvim-compe and nvim-cmp only
		["core.norg.concealer"] = {
			config = {
				icon_preset = "diamond",
				-- markup_preset = "conceal",
			}, -- Allows for use of icons
		},
		["core.norg.qol.toc"] = {},
		["core.keybinds"] = { -- Configure core.keybinds
			config = {
				default_keybinds = true, -- Generate the default keybinds
				hook = function(keybinds)
					keybinds.map("norg", "i", "<C-l>", "core.integrations.telescope.insert_link()")
				end,
			},
		},
		["core.norg.dirman"] = { -- Manage your directories with Neorg
			config = {
				workspaces = {
					home = "~/neorg",
				},
				index = "index.norg",
				--[[ autodetect = true,
          autochdir = false, ]]
			},
		},
	},
})

Some calls are erroring out

First noticed that the find_neorg_files call was throwing error. Going though all the calls, I am getting the below errors for some methods when I call them in the cmdline. Hopefully these are helpful to see a pattern. I know recently there's been a lot of changes with telescope and neorg.

find_aof_tasks: known issue: this can be ignored
image

find_norg_files:
image

switch_workspace:
Telescope popup appears, but then after a few seconds this error shows
image

find_context_tasks: known issue: this can be ignored
image

find_project_tasks: known issue: this can be ignored
image

find_aof_project_tasks: known issue: this can be ignored
image

Rest of the calls are working for me. Let me know if there is additional information you need from my setup. Everything is setup/up-to-date through lazy. I'm on v8.x of neorg with the luarocks integration with lazy.

Request: Use semver to indicate compatibility with `neorg` main plugin

Hey all,

First, let me say thank you for the great job you are doing with this project.

As I'm sure you're aware, many plugin managers (e.g. lazy.nvim) can be configured to only update plugins once a new version is released. In this particular case, I think it could be beneficial for the project to make sure that both the most recent release of the main repo (neorg) and this one are compatible with one another.

For example, currently, my local plugin version of nvim-neorg is at v5.0.0 whereas neorg-telescope is at d803ae4. Without further user interaction, this breaks neorg-telescope (due to neorg@5706f1e, I assume). In the future, this could be prevented by releasing new versions "simultaneously" (or close to it).

Thank you for your time & consideration 😄

performance problem on insert_file_link

First and foremost, thanks a lot for your awesome work. I have now fully switched from Orgmode to Neorg and it is great!

Context

I use Neorg to manage a second brain, which contains hundreds of files. I need the management, linking, and searching to be very fast to have it be truly useful.

Issue

The insert_file_link becomes very slow once about one hundred files are reached. With my current setup, I have to wait up to 15 seconds for the Telescope overlay to appear.

Since searching files by name is quite fast, I am guessing this comes from the fact that the "alt-text" (from metadata title) is computed ahead of time to be displayed in the Telescope suggestions. I have not actually tested this, this is more of a gut feeling.

Would it be possible to add a configuration option to essentially disable the "alt-text" preview and only inject it once a file is selected for insert? That way only a single file's metadata needs to be read (the file that was selected by Telescope) instead of all files' metadata, which I would guess would massively improve performance.

Unable to link after using Neorg journal

Setup to reproduce bug(?):

  1. Open neovim.
  2. Run the journal command :Neorg journal today
  3. Run the find file link command, :Telescope neorg insert_file_link
  4. Expected behavior: telescope searches all files for a valid link
  5. Actual behavior: Telescope ui appears, but contains no files to add.

Thinking paragraph:
My intuition with this is that:

  1. By entering the journal, I did not set my workspace property as "notes".
  2. The integration asks Telescope to search my workspace to obtain files.
  3. Since I didn't have a workspace property, Telescope doesn't seem to know where to search the files.

The issue is that when I load my NvChad setup, it works, albeit being very, very slow. So that's something that may go against my logic above.

Attached are comparisons between personal config and NvChad config OBS has crashed on me. Will add as soon as I can.

UPDATE:

For some reason, and I literally have no idea why, but my personal config actually does the same thing as the NvChad config? I edited nothing, and did the same steps, but now all it does is load a while before continuing normally.
I've tested entering the journal while in a file, but it had the same behaviour.

<C-l> in insert mode is always active

Hi,
I'm using <c-l> in insert mode for other things (luasnips), therefore I'd like to remap them to something else here.

I have set

    local neorg_callbacks = require("neorg.callbacks")

    neorg_callbacks.on_event("core.keybinds.events.enable_keybinds", function(_, keybinds)
      -- Map all the below keybinds only when the "norg" mode is active
      keybinds.map_event_to_mode("norg", {
        i = { -- Bind  in insert mode
          { "<C-L>", "core.integrations.telescope.insert_link" }, -- capital L here
        },
      }, {
          silent = true,
          noremap = true,
        })
    end)

but <c-l> in insert mode is still active. Can the mapping be removed somehow?

module neorg.modules.core.integrations.telescope.module not found

Hi, I am new to neorg and have no idea how to fix the errors I am getting. I hope someone with experience can help.

Here is the error I am getting:

[neorg] (16:22:56)
.../.local/share/nvim/lazy/neorg/lua/neorg/core/modules.lua:447
Unable to load module 'core.integrations.telescope'. The module probably does not exist! Stacktrace: module 'neorg.modules.core.integrations.telescope.module' not found:No LuaRocks module found for neorg.modules.core.integrations.telescope.module
no field package.preload['neorg.modules.core.integrations.telescope.module']
cache_loader: module neorg.modules.core.integrations.telescope.module not found
cache_loader_lib: module neorg.modules.core.integrations.telescope.module not found
no file './neorg/modules/core/integrations/telescope/module.lua'
no file '/usr/share/luajit-2.1/neorg/modules/core/integrations/telescope/module.lua'
no file '/usr/local/share/lua/5.1/neorg/modules/core/integrations/telescope/module.lua'
no file '/usr/local/share/lua/5.1/neorg/modules/core/integrations/telescope/module/init.lua'
no file '/usr/share/lua/5.1/neorg/modules/core/integrations/telescope/module.lua'
no file '/usr/share/lua/5.1/neorg/modules/core/integrations/telescope/module/init.lua'
no file '/home/mts/.local/share/nvim/lazy/luarocks.nvim/.rocks/share/lua/5.1/neorg/modules/core/integrations/telescope/module.lua'
no file '/home/mts/.local/share/nvim/lazy/luarocks.nvim/.rocks/share/lua/5.1/neorg/modules/core/integrations/telescope/module/init.lua'
no file '/home/mts/.local/share/nvim/lazy/luarocks.nvim/.rocks/lua/neorg/modules/core/integrations/telescope/module.lua'
no file '/home/mts/.local/share/nvim/lazy/luarocks.nvim/.rocks/lua/neorg/modules/core/integrations/telescope/module/init.lua'
no file '/home/mts/.luarocks/share/lua/5.1/neorg/modules/core/integrations/telescope/module.lua'
no file '/home/mts/.luarocks/share/lua/5.1/neorg/modules/core/integrations/telescope/module/init.lua'
no file './neorg/modules/core/integrations/telescope/module.so'
no file '/usr/local/lib/lua/5.1/neorg/modules/core/integrations/telescope/module.so'
no file '/usr/lib/lua/5.1/neorg/modules/core/integrations/telescope/module.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
no file '/home/mts/.local/share/nvim/lazy/luarocks.nvim/.rocks/lib/lua/5.1/neorg/modules/core/integrations/telescope/module.so'
no file '/home/mts/.luarocks/lib/lua/5.1/neorg/modules/core/integrations/telescope/module.so'
no file './neorg.so'
no file '/usr/local/lib/lua/5.1/neorg.so'
no file '/usr/lib/lua/5.1/neorg.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
no file '/home/mts/.local/share/nvim/lazy/luarocks.nvim/.rocks/lib/lua/5.1/neorg.so'
no file '/home/mts/.luarocks/lib/lua/5.1/neorg.so'

here is the Nvim plugin i am using:

return {
"nvim-neorg/neorg",
version = "^8",
dependencies = {
{
"vhyrro/luarocks.nvim",
priority = 1000, -- We'd like this plugin to load first out of the rest
config = true,
},
},
event = "VeryLazy",
opts = {
load = {
["core.defaults"] = {}, -- Loads default behaviour
["core.ui.calendar"] = {},
["core.ui"] = {},
["core.ui.calendar.views.monthly"] = {},
["core.clipboard"] = {},
["core.concealer"] = {}, -- Adds pretty icons to your documents
["core.itero"] = {},
["core.promo"] = {},
["core.qol.todo_items"] = {},
["core.export.markdown"] = {},
["core.summary"] = {},
["core.integrations.image"] = {},
["core.manoeuvre"] = {},
["core.integrations.telescope"] = {},
["core.latex.renderer"] = {},
["core.highlights"] = {},
["core.integrations.treesitter"] = {},
["core.tempus"] = {},
["core.autocommands"] = {},
["core.keybinds"] = {}, -- Adds default keybindings
["core.completion"] = {
config = {
engine = "nvim-cmp",
},
}, -- Enables support for completion plugins
["core.journal"] = {}, -- Enables support for the journal module
["core.dirman"] = { -- Manages Neorg workspaces
config = {
workspaces = {
personal notes = "/notes/notes",
work = "
/notes/work",
linux = "~/notes/linux",
},
},
},
},
},
}

Any suggestions ?

insert_link yields incorrrect results (missing $/) for relative file paths

Hi @max397574 , thank you for creating this awesome plugin.

The issue: let's say we have this folder structure, and I'm in the 2022 Jul 25 file:
Screenshot from 2022-07-26 06-38-30

If I run Telescope neorg insert_link, and pick one of the headers in rust.norg in the examples folder, the result will be:

{:examples/rust:* Programming in Rust}[Programming in Rust]

Which won't work.
The correct result should be:

{:$/examples/rust:* Programming in Rust}[Programming in Rust]

It's odd that Telescope neorg insert_file_link handles this well. This must be a bug fore insert_link.

List Backlinks to the Current File

I'd like to be able to list all the links to the current file.

If we carve out an exception for relative paths it could be a really simple implementation. Either include potentially wrong relative paths, or just not include relative paths at all. That way we can just use a single rg regex I think.

Thoughts?

switch workspace index nil error

[neorg] (17:37:43)
.../nvim/site/pack/packer/start/neorg/lua/neorg/modules.lua:238
Unable to load module core.integrations.telescope - ...ope/lua/telescope/_extensions/neorg/switch_workspace.lua:16: attempt to index a nil value

I've been seeing this error intermittently, and I'm having some trouble reproducing it. It seems to happen more often when I run :NeorgStart after a computer restart, which leads me to believe it may be something to do with a cache or race condition somewhere.

I'm curious to see if anyone else has seen this come up.

Link to error line for convenience

search_headings crashing

Hi,

when trying
:Telescope neorg search_headings

I get this error

Error executing Lua callback: ...cope/lua/telescope/_extensions/neorg/search_headings.lua:68: attempt to index local 'query' (a
 nil value)
stack traceback:
        ...cope/lua/telescope/_extensions/neorg/search_headings.lua:68: in function <...cope/lua/telescope/_extensions/neorg/se
arch_headings.lua:21>
        ...ck/packer/start/telescope.nvim/lua/telescope/command.lua:183: in function 'run_command'
        ...ck/packer/start/telescope.nvim/lua/telescope/command.lua:253: in function 'load_command'
        ...te/pack/packer/start/telescope.nvim/plugin/telescope.lua:109: in function <...te/pack/packer/start/telescope.nvim/pl
ugin/telescope.lua:108>

after looking into the code of search_heading.lua I found that the variable filetype was set to the empty string.

The error got removed when I placed the lines

local lines = vim.api.nvim_buf_get_lines(0, 0, -1, true)
local bufnr = vim.api.nvim_get_current_buf()
local filename = vim.fn.expand(vim.api.nvim_buf_get_name(bufnr))
local filetype = vim.api.nvim_buf_get_option(bufnr, "filetype")

inside the function being returned.

This makes more sense to me in any case otherwise it seems that when you have multiple norg buffers opened only the original one is searched.

However I then got a second error

Error executing Lua callback: ...cope/lua/telescope/_extensions/neorg/search_headings.lua:99: attempt to get length of a nil va
lue
stack traceback:
        ...cope/lua/telescope/_extensions/neorg/search_headings.lua:99: in function <...cope/lua/telescope/_extensions/neorg/se
arch_headings.lua:14>
        ...ck/packer/start/telescope.nvim/lua/telescope/command.lua:183: in function 'run_command'
        ...ck/packer/start/telescope.nvim/lua/telescope/command.lua:253: in function 'load_command'
        ...te/pack/packer/start/telescope.nvim/plugin/telescope.lua:109: in function <...te/pack/packer/start/telescope.nvim/pl
ugin/telescope.lua:108>

It seems to come from the block

while row < row2 + 1 do
            row = row + 1

            for index = 0, #lines[row] do
              line_highlights[row][index] = hl
            end
          end

By making the loop condition row < row2 the error got removed and now the function works well on my end.
Given how little experience I have I could totally have missed something however.

Broken on head?

Hi,

trying to open :Neorg Telescope currently gives me this error:

E5108: Error executing lua ...ck/packer/start/telescope.nvim/lua/telescope/command.lua:184: attempt to call a nil value                                                                                             
stack traceback:                                                                                                                                                                                                    
        ...ck/packer/start/telescope.nvim/lua/telescope/command.lua:184: in function 'run_command'                                                                                                                  
        ...ck/packer/start/telescope.nvim/lua/telescope/command.lua:241: in function 'load_command'                                                                                                                 
        [string ":lua"]:1: in main chunk

is this a problem just for me? I'm on NVIM v0.7.0-dev+868-g25eb7692d

[Feature request] Linking to arbitrary linkable in another file

I've been getting some great uses out of this plugin! But it seems we don't have a convenient way to use telescope to link to headers inside other files. I imagine something like the command to find AOF task or project task could work here: we first pick another file, and then pick a linkable inside it.

Errror while loading up norg-telescope

Whenever I enter neovim with neorg-telescope installed I get the following error message:
[neorg] (14:18:39) .../site/pack/packer/start/neorg/lua/neorg/core/modules.lua:438 Unable to load module core.integrations.telescope - ...lua/neorg/modules/core/integrations/telescope/module.lua:5: module 'neorg.modules.base' not found:
Which ends up not loading the plugin and rendering it useless
The problem also appeared on a fresh installation in a VM with the only packages being neorg, neorg-telescope and their dependencies.
I got a similar error when in one of my scripts I tried to require "neorg.modules", but it got fixed after replacing it with "neorg.core.modules". I tried the same here but fixing the import in the source code of the plugin still didn't solve the issue.
My guess is that lua/neovim for some reason no longer can find 'base' inside of 'modules'.

Insert link throws an error

Error executing Lua callback: ...scope.nvim/lua/telescope/finders/async_static_finder.lua:16: bad argument #1 to 'ipairs' (table expected, got nil)
stack traceback:
        [C]: in function 'ipairs'
        ...scope.nvim/lua/telescope/finders/async_static_finder.lua:16: in function 'new_table'
        ...elescope/lua/telescope/_extensions/neorg/insert_link.lua:106: in function 'insert_link'
        ...lua/neorg/modules/core/integrations/telescope/module.lua:53: in function 'on_event'
        ...e/nvim/site/pack/packer/start/neorg/lua/neorg/events.lua:153: in function 'broadcast_event'
        ...r/start/neorg/lua/neorg/modules/core/keybinds/module.lua:445: in function <...r/start/neorg/lua/neorg/modules/core/keybinds/module.lua:430>
        ...r/start/neorg/lua/neorg/modules/core/keybinds/module.lua:429: in function 'on_event'
        ...e/nvim/site/pack/packer/start/neorg/lua/neorg/events.lua:153: in function 'broadcast_event'
        ...r/start/neorg/lua/neorg/modules/core/neorgcmd/module.lua:289: in function <...r/start/neorg/lua/neorg/modules/core/neorgcmd/module.lua:196>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.