Giter Site home page Giter Site logo

nvim-neorg / neorg Goto Github PK

View Code? Open in Web Editor NEW
6.1K 49.0 207.0 4.8 MB

Modernity meets insane extensibility. The future of organizing your life in Neovim.

License: GNU General Public License v3.0

Lua 97.27% Scheme 1.69% Makefile 0.06% Vim Script 0.10% Nix 0.88% Shell 0.01%
neovim organization org-mode neovim-plugin lua neorg nvim

neorg's Introduction

Neorg - An Organized Future

Neovim Discord License Usage

Your New Life Organization Tool - All in Lua

TutorialRoadmapInstallationFurther Learning
CreditsSupport


⚠️ Neorg 8.0.0 has introduced some breaking changes! Please see this blog post on how to migrate.

Summary

Neorg (Neo - new, org - organization) is a Neovim plugin designed to reimagine organization as you know it. Grab some coffee, start writing some notes, let your editor handle the rest.

What is Neorg?

Neorg is an all-encompassing tool based around structured note taking, project and task management, time tracking, slideshows, writing typeset documents and much more. The premise is that all of these features are built on top of a single base file format (.norg), which the user only has to learn once to gain access to all of Neorg's functionality.

Not only does this yield a low barrier for entry for new users it also ensures that all features are integrated with each other and speak the same underlying language. The file format is built to be expressive and easy to parse, which also makes .norg files easily usable anywhere outside of Neorg itself.

A good way of thinking about Neorg is as a plaintext environment which can be adapted to a variety of use cases. If a problem can be represented using raw text, it can be solved using Neorg.

IMPORTANT: Neorg is young software. We consider it stable however be prepared for occasional breaking workflow changes. Make sure to pin the version of Neorg you'd like to use and only update when you are ready.

🌟 Tutorial

A video tutorial may be found on Youtube:

📦 Installation

Neorg's setup process is slightly more complex than average, so we encourage you to be patient :)

Neorg requires Neovim 0.10 or above to function. After you're done with the installation process, run :checkhealth neorg to see if everything's correct!

rocks.nvim

One way of installing Neorg is via rocks.nvim.

Installation snippet.
  • Run :Rocks install rocks-config.nvim (if you don't have it already!).
  • Run :Rocks install neorg.
  • From the root of your configuration (~/.config/nvim/ on unix-like systems), create a lua/plugins/neorg.lua file and place the following content inside:
    require("neorg").setup()

For the time being you also need nvim-treesitter installed, but the plugin is not readily available on luarocks yet. To counter this, you also need to run the following:

  • :Rocks install rocks-git.nvim
  • :Rocks install nvim-treesitter/nvim-treesitter
  • Just like the neorg.lua file, create a lua/plugins/treesitter.lua file and place the following content inside:
    require("nvim-treesitter.configs").setup({
      highlight = {
        enable = true,
      },
    })

The last three steps will eventually not be required to run Neorg.

neorg-kickstart

Not bothered to set up Neovim on your own? Check out our kickstart config which will get you up and running with Neorg without any prior Neovim configuration knowledge.

lazy.nvim

To install Neorg via lazy, first ensure that you have luarocks installed on your system. On Linux/Mac, this involves installing using your system's package manager. On Windows, consider the Lua for Windows all-in-one package.

Click for installation snippet.
{
    "nvim-neorg/neorg",
    lazy = false, -- Disable lazy loading as some `lazy.nvim` distributions set `lazy = true` by default
    version = "*", -- Pin Neorg to the latest stable release
    config = true,
}

packer.nvim

Neorg can be installed purely via luarocks on packer, pulling in all required dependencies in the process.

It is not recommended to use packer as it is now unmaintained.

Click for installation snippet.
use {
  "nvim-neorg/neorg",
  rocks = { "lua-utils.nvim", "nvim-nio", "nui.nvim", "plenary.nvim", "pathlib.nvim" },
  tag = "*", -- Pin Neorg to the latest stable release
  config = function()
      require("neorg").setup()
  end,
}

Other Plugin Managers

Because of the complexities of luarocks we are choosing not to supported other plugin managers for the time being. It is actively on our TODO list, however!

📚 Further Learning

After you have installed Neorg, we recommend you head over to either the Youtube tutorial series or to the wiki!

Credits

Massive shoutouts go to all the contributors actively working on the project together to form a fantastic integrated workflow:

  • mrossinek - for basically being my second brain when it comes to developing new features and adding new syntax elements
  • danymat - for creating the excellent foundations for the up and coming GTD system

And an extra thank you to:

  • Binx - for making that gorgeous logo for free!
  • bandithedoge - for converting the PNG version of the logo into SVG form

Support

Love what I do? Want to see more get done faster? Want to support future projects? Any sort of support is always heartwarming and fuels the urge to keep going ❤️. You can show support here:

Immense thank you to all of the sponsors of my work!

vsedov   skbolton   molleweide   danymat   theherk   purepani   tromars   jgregoire   bottd   DingDean   mtrajano   

neorg's People

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  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

neorg's Issues

[BUG] Treesitter highlighting does not work for latex code blocks

Neovim Version

NVIM v0.6.0-dev+nightly-3-g384a43fe7
Build type: Release
LuaJIT 2.1.0-beta3
Features: +acl +iconv +tui

Branch

unstable

Loaded modules

core.defaults
core.norg.concealer
core.integrations.telescope
core.norg.completion
core.norg.dirman

Expected behavior

Latex code highlighting should be the same as a normal .tex file.

Actual behavior

Latex code is not highlighted at all.

Other information

Highlighting in Neorg
image

Highlighting in .tex file
image

Treesitter Playground shows some errors.
image

Maybe add plenary.nvim as a dependency in the packer snippet for installation?

Neovim version: v0.6.0-dev+42-geece0735f

There are some function calls in neorg.lua that are found in plenary.nvim. But without it at least my neovim freaked out each time I tried testing neorg with a blank .norg file.

packer.nvim: Error running config for neorg: ...al/share/nvim/site/pack/packer/start/neorg/lua/neorg.lua:46: module 'plenary.async_lib.async' not found:                                                            
^Ino field package.preload['plenary.async_lib.async']                                                                                                                                                               
^Ino file './plenary/async_lib/async.lua'                                                                                                                                                                           
^Ino file '/home/ms45/Software/neovim/.deps/usr/share/luajit-2.1.0-beta3/plenary/async_lib/async.lua'                                                                                                               
^Ino file '/usr/local/share/lua/5.1/plenary/async_lib/async.lua'                                                                                                                                                    
^Ino file '/usr/local/share/lua/5.1/plenary/async_lib/async/init.lua'                                                                                                                                               
^Ino file '/home/ms45/Software/neovim/.deps/usr/share/lua/5.1/plenary/async_lib/async.lua'                                                                                                                          
^Ino file '/home/ms45/Software/neovim/.deps/usr/share/lua/5.1/plenary/async_lib/async/init.lua'                                                                                                                     
^Ino file '/home/ms45/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/plenary/async_lib/async.lua'                                                                                                           
^Ino file '/home/ms45/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/plenary/async_lib/async/init.lua'                                                                                                      
^Ino file '/home/ms45/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/plenary/async_lib/async.lua'                                                                                                  
^Ino file '/home/ms45/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/plenary/async_lib/async/init.lua'                                                                                             
^Ino file './plenary/async_lib/async.so'                                                                                                                                                                            
^Ino file '/usr/local/lib/lua/5.1/plenary/async_lib/async.so'                                                                                                                                                       
^Ino file '/home/ms45/Software/neovim/.deps/usr/lib/lua/5.1/plenary/async_lib/async.so'                                                                                                                             
^Ino file '/usr/local/lib/lua/5.1/loadall.so'                                                                                                                                                                       
^Ino file '/home/ms45/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/lua/5.1/plenary/async_lib/async.so'                                                                                                              
^Ino file './plenary.so'                                                                                                                                                                                            
^Ino file '/usr/local/lib/lua/5.1/plenary.so'                                                                                                                                                                       
^Ino file '/home/ms45/Software/neovim/.deps/usr/lib/lua/5.1/plenary.so'                                                                                                                                             
^Ino file '/usr/local/lib/lua/5.1/loadall.so'

This all went away once I installed plenary, it genuinely caused me some panic and I even recompiled neovim, but it was all fixed with plenary, so maybe plugging it somewhere in the README? Maybe I was too blind and didn't see it mentioned anywhere.

Module `load()` function uses default configuration if already loaded

There's a bug as of right now that prevents the user from editing a module's configuration if that module is already being loaded in e.g. a metamodule beforehand. The load function for the module gets invoked whenever the module is initially loaded - if the module does anything reliant on config options during this time it will not be using the overrode defaults. Big sad, will fix before 0.1 releases. Shouldn't pose too much of a problem for users as of right now :)

Will neorg support exporting to another filetypes ? e.g latex, pdf, markdown...

First, I'm just talking about the things I believe are awesome.

Hey, I've been following this project for a while now, it looks awesome. I've read the specification and there's a few things that I think were just excellent decisions in the design of this. I love how clean the syntax looks (personally I don't have any problem with markdown but this definitely looks better and makes more sense). And the other thing that I love is that this is being created within the context of being use with vim bindings. An example of this is the ordered lists, that fact you're using just tags to enclose ordered lists makes it so people can just dd a line and change the position without having to worry about the number (this is a pain in markdown), when I was reading the specification I thought that was such an elegant solution considering that is being made to be use in neovim.

Now the real question of this issue, I didn't see any mention of exporting to other filetypes like with org mode. I think that one of the key features of org is being able to export to html, pdf, latex... and more. I suppose that if you're thinking if making this a better alternative to org, the export feature is planned. But I was wondering when you think this will be possible. (or mybe it already is, idk)

Completion.nvim support

Discussed in #112

Originally posted by ITHDevelopment September 17, 2021
Another big completion engine is completion.nvim and it would be great to have support for it. Just that.

discussion about how to use with smartphones

I'm starting a thread where we can talk about how could one use neorg on the go. How could one edit notes and stuff on ones smartphone and keep stuff in sync or in git repo?? How do other people do this?
I am personally quite new to neovim and have never dabbled in syncing stuff etc. but I would like to learn? What would be some recommendations on how to do this with neorg if neorg was my main note taking environment?

I am not sure if this is off topic but I think that it makes sense to think/talk about this since it falls in line with the overall philosphy of neorg. What do you think @vhyrro? Am I being stupid here??

Treesitter Integration Not Working

I can't put my finger on what I'm missing but I can't seem to get my @code blocks to be formatted.

CleanShot 2021-07-14 at 10 56 26@2x

I believe I've followed the instructions:

require('neorg').setup {
  load = {
    ['core.defaults'] = {},
    ['core.norg.concealer'] = {},
  }
}

local parser_configs = require('nvim-treesitter.parsers').get_parser_configs()

parser_configs.norg = {
    install_info = {
        url = "https://github.com/vhyrro/tree-sitter-norg",
        files = { "src/parser.c" },
        branch = "main"
    },
}

require('nvim-treesitter.configs').setup {
  ...

I've confirmed that I have the Ruby Treesitter parser installed (I've also tried JavaScript).

CleanShot 2021-07-14 at 11 04 13@2x

I've tried the unstable branch as well in case that mattered.


side question -- is there any way to influence the size or color of the glyphs? I've tried a couple of different colorschemes but the glyphs end up a little hard to see (note: I've scaled up the font size in my screenshots here).

[FEATURE REQUEST] Writing configs , or even code , using neorg

Issues

  • I have checked existing issues and there are no existing ones with the same request.

Feature description

Would there be support for exporting the code segments to an actual file , like many emacs users do. They write well documented code in org and then just export it.
Window_org

Help

Yes, but I don't know how to start. I would need guidance

Implementation help

I read in the CONTRIBUTING.md that i have to write everything in modules. So i make a new dir in /modules and start hacking away? Any help would be appreciated !

Calendar and appointments

It would be super awesome if it could include something along the lines of calcurse to manage appointments and tasks.

I am currently looking into ways to get organized and calcurse is almost what I was looking for. Just wished it could be more easy to integrate with other programs.

I have never written a plugin for vim, but I could try and help on this idea.

Graph backend for notes (-> zettlekasten)

This is a feature request

One of the interesting idea about note-taking is the way of linking notes together: many note taking apps use a graph-based structure instead of a tree-based structure like files.

This is an insanely powerfull idea, and this is how wikis works.

Org mode has org toam that is doing that with some kind of database as a backend, and I think neorg really needs that. At least someone should be able to create a wiki for himself really easily.

Are there plans to create a backend/integration that could handle that way of linking notes together ?

Filetype for normal file(s) set to norg

I've noticed that when I leave a neorg buffer sometimes the filetype of the buffer I was in before opening the neorg file is set to norg.

The way that I reproduce this is is using the following config

    use {
      'vhyrro/neorg',
      branch = 'unstable',
      requires = { 'vhyrro/neorg-telescope' },
      config = function()
        require('neorg').setup {
          load = {
            ['core.defaults'] = {},
            ['core.integrations.telescope'] = {},
            ['core.keybinds'] = {
              config = {
                default_keybinds = true,
                neorg_leader = '<Leader>o',
              },
            },
            ['core.norg.concealer'] = {},
            ['core.norg.dirman'] = {
              config = {
                workspaces = {
                  notes = '<path>',
                },
              },
            },
          },
        }
      end,
  1. Open a lua file in nvim, I use my dotfiles 🤷🏿‍♂️
  2. Enter command :Neorg<CR> sometimes this will open my neorg index file in my notes workspace, sometimes it won't 🤔
  3. If it works 😅 you should be in your index.norg.
  4. Close buffer with :bd
  5. Check ft for previous buffer which is now norg

Incorrect highlighting of URLs

There's a bug where URLs get concealed absolutely awfully when in a TODO item :P

error

This is because the regex used for concealing skips over this character as it doesn't have a parenthesis after itself rather than stopping parsing at that point

[BUG] Bad argument #3 to 'fs_write' (number expected, got no value)

Contributions

Plugin Version

  • I am using the latest version of the plugin

Neovim Version

  • I am using the latest neovim version (0.5)

Neovim Version

NVIM v0.6.0-dev+8-g75f758b99

Log Output

I think those errors are from when I was trying to run some neorg commands and are likely not related to the actual bug but regardless, maybe it is connected somehow.

[ERROR petak, 30. srpnja 2021. 18:23:12 CEST] ...r/start/neorg/lua/neorg/modules/core/neorgcmd/module.lua:295: Unable to execute neorg command under name set-mode - minimum argument count not satisfied. The command requires at least 1 arguments.

[ERROR petak, 30. srpnja 2021. 18:24:07 CEST] ...r/start/neorg/lua/neorg/modules/core/neorgcmd/module.lua:295: Unable to execute neorg command under name core.keybinds.trigger - minimum argument count not satisfied. The command requires at least 2 arguments.

[ERROR petak, 30. srpnja 2021. 20:33:11 CEST] ...r/start/neorg/lua/neorg/modules/core/neorgcmd/module.lua:295: Unable to execute neorg command under name nil - minimum argument count not satisfied. The command requires at least 1 arguments.

[ERROR petak, 30. srpnja 2021. 20:33:15 CEST] ...r/start/neorg/lua/neorg/modules/core/neorgcmd/module.lua:295: Unable to execute neorg command under name module.load - minimum argument count not satisfied. The command requires at least 1 arguments.

Branch

unstable

Loaded modules

neorg.setup({
    load = {
        ["core.defaults"] = {},
        ["core.norg.concealer"] = {},
        ["core.norg.dirman"] = {
            config = {
                workspaces = {
                    my_workspace = "~/notes",
                },
            },
        },
        ["core.keybinds"] = {
            config = {
                default_keybinds = true,
                neorg_leader = "<Leader>o",
            },
        },
    },
})

Expected behavior

When I close a norg file, for it to not error out.

Actual behavior

When I close a norg file I get the following error.

I'm closing it with :qa

Error executing luv callback:
...tart/neorg/lua/neorg/modules/core/norg/dirman/module.lua:371: bad argument #3 to 'fs_write' (number expected, got no value)

Potentially conflicting plugins

No response

Other information

This happens regardless if there is content in the file or not.

Help

No

Implementation help

No response

Add Generated Content

In formats such as Org-Mode and RMarkdown, it is possible to use a syntax for generating and displaying data as E.G. tables and graphs. Neorg lacks such functionality, forcing the external creation and embedding of information into a document. In the spirit of avoiding unneeded dependencies, I propose that we use the Lua engine built into Neovim to allow execution of tagged code blocks which generate Neorg markup to e.g. display a generated image.

Change of Working Directory

Hi,

When opening files, Neorg changes the working directory.

Problems with that approach

Usually I work in a project and at some point in time I want to quickly add something to my TODO list, so I open my my norg file and add it. The moment I do this, I'm in a different working directory (which for example doesn't let me grep through my code base anymore).

Steps to reproduce

  1. Go into directory ~/foo, open up Neovim
  2. Open any norg file in the neorg directory: :e ~/neorg/foo.norg
  3. See that it changed the working directory: :pwd (outputs ~/neorg)

Thanks and best regards,
David

High Level User Overview

Hey @vhyrro - this looks great! I would love to try it out at some point. However, I have a system in place that I am quite comfortable with. Before I want to dive too much into the documentation of neorg, would there be any way you could make a high level user overview video showing how the day to day person might use neorg? Something like this video would be outstanding: https://www.youtube.com/watch?v=SzA2YODtgK4

Thanks!

[BUG] Parts of a text link concealed

Contributions

Plugin Version

  • I am using the latest version of the plugin

Neovim Version

  • I am using the latest neovim version (0.5)

Neovim Version

NVIM v0.6.0-dev+8-g75f758b99

Log Output

N/A

Branch

unstable

Loaded modules

neorg.setup({
    load = {
        ["core.defaults"] = {},
        ["core.norg.concealer"] = {},
        ["core.norg.dirman"] = {
            config = {
                workspaces = {
                    my_workspace = "~/notes",
                },
            },
        },
        ["core.keybinds"] = {
            config = {
                default_keybinds = true,
                neorg_leader = "<Leader>o",
            },
        },
    },
})

Expected behavior

When I paste a plain text link for it no to be concealed and all characters to be visible.

Actual behavior

image

The plain text of it is: https://neovim.discourse.group/
But its displaying it as in the picture

Potentially conflicting plugins

No response

Other information

No response

Help

No

Implementation help

No response

Code Blocks

Hi,

This is a feature request to make code blocks a bit nicer to use.

Current State

@code javascript
  const foo = () => { console.log('hello world') }
@end

Proposal 1

Have the same identifiers as in GitHub markdown, e.g.

@code js
  const foo = () => { console.log('hello world') }
@end

Proposal 2

Also allow triple backticks, e.g.

| ```js
|   const foo = () => { console.log('hello world') }
| ```

[BUG] Can't integrate with lazy-loaded nvim-compe

Contributions

Plugin Version

  • I am using the latest version of the plugin

Neovim Version

  • I am using the latest neovim version (0.5)

Neovim Version

NVIM v0.6.0-dev+98-ga5c25e4f3

Log Output

No such file

Branch

master

Loaded modules

      require("neorg").setup({
        load = {
          ["core.defaults"] = {}, -- Load all the default modules
          ["core.norg.concealer"] = {}, -- Allows for use of icons
          ["core.norg.dirman"] = { -- Manage your directories with Neorg
            config = {
              workspaces = {
                my_workspace = "~/neorg"
              }
            }
          }
        }
      })

Expected behavior

neorg have some kind of fallbacks for lazy loaded nvim-compe, here's the configuration for packer.nvim:

  use {"hrsh7th/nvim-compe",
    event = "InsertEnter",
    config = function()
      require'compe'.setup {
        enabled = true;
        autocomplete = true;
        debug = false;
        min_length = 1;
        preselect = 'enable';
        throttle_time = 80;
        source_timeout = 200;
        resolve_timeout = 800;
        incomplete_delay = 400;
        max_abbr_width = 100;
        max_kind_width = 100;
        max_menu_width = 100;
        documentation = {
          border = { '', '' ,'', ' ', '', '', '', ' ' },
          winhighlight = "NormalFloat:CompeDocumentation,FloatBorder:CompeDocumentationBorder",
          max_width = 120,
          min_width = 60,
          max_height = math.floor(vim.o.lines * 0.3),
          min_height = 1,
        };

Actual behavior

packer.nvim: Error running config for neorg: ...ua/neorg/modules/core/integrations/nvim-compe/module.lua:22: nvim-compe not found, aborting...

Potentially conflicting plugins

nvim-compe, packer.nvim

Other information

None.

Help

Yes, but I don't know how to start. I would need guidance (check question below)

Implementation help

Can you provide a clear structure of the project and where is the related scripts?

User Scenario: Getting Things Done

I use a lightweight, GTD-inspired system to manage my tasks, and it would be great if neorg considered those scenarios as it's being built out. This is one way that neorg could be better than org mode, which has a whole host of implementation approaches to consider.

The most important parts of GTD are very simple:

  • Have a central list of tasks
  • If there's a goal to achieve that takes more than one task to achieve, it turns into a project.
  • A project has a goal and a list of tasks
  • On the central list of tasks, show all the non-project tasks and ONE task per project - the next one (aka "next action").

That's most of it. Otherwise it's useful to have some tagging and attributes per task and per project (e.g. "Work" vs "Personal"). There are other parts, like tasks you're waiting on others for, and events tied to a calendar, but I suspect you'd add those anyway...

[CHORE] Stop using raw require statements in `core.integrations.treesitter`

One of the things that bugs me a lot is the fact that inside core.integrations.treesitter we perform several calls to require('nvim-treesitter.ts_utils'). This is pretty unsafe especially since we can't guarantee everyone will have nvim-treesitter installed (even though they should :P)

All we need is a small refactor. During the module's load sequence we perform a pcall-wrapped require call to nvim-treesitter and then store it in a variable and supply a function to reference it (like e.g. core.integrations.treesitter.public.get_ts_utils()). This is a safer approach and will at least provide a more insightful error message lol. I'm placing this in an issue cause I'm not bothered to do it now but at the same time I don't want to forget it 💀

[BUG] Incorrect icon rendering

Contributions

Plugin Version

  • I am using the latest version of the plugin

Neovim Version

  • I am using the latest neovim version (0.5)

Neovim Version

NVIM v0.6.0-dev+8-g75f758b99

Log Output

N/A

Branch

unstable

Loaded modules

neorg.setup({
    load = {
        ["core.defaults"] = {},
        ["core.norg.concealer"] = {},
        ["core.norg.dirman"] = {
            config = {
                workspaces = {
                    my_workspace = "~/notes",
                },
            },
        },
        ["core.keybinds"] = {
            config = {
                default_keybinds = true,
                neorg_leader = "<Leader>o",
            },
        },
    },
})

Expected behavior

When I type in ** for it to render the icon instead of the broken icon.

Actual behavior

When I type in ** (or and other * combos, haven't tested with other icons), it renders this

image

If I remove space at the start of the line it fixes it.

What I noticed happens, is if I'm at the beginning of the line, and type in ** it's going to insert a space before those characters and render the bugged-out icon. If I remove the space it inserts at the start of the line it fixes it.

Potentially conflicting plugins

No response

Other information

No response

Help

No

Implementation help

No response

`.org` extension support?

Is Neorg intended to have file format compatibility with org mode?

If so, is there some way to support files with the .org extension, in addition to (or instead of) .norg files?

Inline comments/tags

As far as I can tell, comments are implemented by using certain tags, such as @comment ... @end. But according to the docs, these need to be at the beginning of the line. Is there any way to do inline comments? I currently use markdown a lot and extensively use <!-- --> to write comments to myself about individual sentences that require editing.

[BUG] `unstable` branch error: `loadall.so`

Contributions

Plugin Version

  • I am using the latest version of the plugin

Neovim Version

  • I am using the latest neovim version (0.5)

Neovim Version

NVIM v0.6.0-dev+nightly-1026-g274a3504a

Log Output

[ERROR Thu Aug 26 17:11:55 2021] .../nvim/site/pack/packer/start/neorg/lua/neorg/modules.lua:165: Unable to load module core.norg.qol.toc - module 'neorg.modules.core.norg.qol.toc.module' not found:
	no field package.preload['neorg.modules.core.norg.qol.toc.module']
	no file './neorg/modules/core/norg/qol/toc/module.lua'
	no file '/usr/local/Cellar/luajit-openresty/2.1-20210510/share/luajit-2.1.0-beta3/neorg/modules/core/norg/qol/toc/module.lua'
	no file '/usr/local/share/lua/5.1/neorg/modules/core/norg/qol/toc/module.lua'
	no file '/usr/local/share/lua/5.1/neorg/modules/core/norg/qol/toc/module/init.lua'
	no file '/usr/local/Cellar/luajit-openresty/2.1-20210510/share/lua/5.1/neorg/modules/core/norg/qol/toc/module.lua'
	no file '/usr/local/Cellar/luajit-openresty/2.1-20210510/share/lua/5.1/neorg/modules/core/norg/qol/toc/module/init.lua'
	no file './neorg/modules/core/norg/qol/toc/module.so'
	no file '/usr/local/lib/lua/5.1/neorg/modules/core/norg/qol/toc/module.so'
	no file '/usr/local/Cellar/luajit-openresty/2.1-20210510/lib/lua/5.1/neorg/modules/core/norg/qol/toc/module.so'
	no file '/usr/local/lib/lua/5.1/loadall.so'
	no file './neorg.so'
	no file '/usr/local/lib/lua/5.1/neorg.so'
	no file '/usr/local/Cellar/luajit-openresty/2.1-20210510/lib/lua/5.1/neorg.so'
	no file '/usr/local/lib/lua/5.1/loadall.so'

Branch

unstable

Loaded modules

Current configuration:

require('neorg').setup {
  load = {
    ['core.defaults'] = {},
    ['core.norg.concealer'] = {},
  }
}

-- This sets the leader for all Neorg keybinds. It is separate from the regular <Leader>,
-- And allows you to shove every Neorg keybind under one "umbrella".
local neorg_leader = "<Leader>" -- You may also want to set this to <Leader>o for "organization"

-- Require the user callbacks module, which allows us to tap into the core of Neorg
local neorg_callbacks = require('neorg.callbacks')

-- Listen for the enable_keybinds event, which signals a "ready" state meaning we can bind keys.
-- This hook will be called several times, e.g. whenever the Neorg Mode changes or an event that
-- needs to reevaluate all the bound keys is invoked
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", {
    n = { -- Bind keys in normal mode

      -- Keys for managing TODO items and setting their states
      { "gtd", "core.norg.qol.todo_items.todo.task_done" },
      { "gtu", "core.norg.qol.todo_items.todo.task_undone" },
      { "gtp", "core.norg.qol.todo_items.todo.task_pending" },
      { "<C-Space>", "core.norg.qol.todo_items.todo.task_cycle" }

    },
  }, { silent = true, noremap = true })
end)

Expected behavior

No errors when loading.

Actual behavior

Error displayed in command line.

Potentially conflicting plugins

No response

Other information

Extracting issue from comment on another issue.

I'm seeing the following message when I open a .norg file.

[neorg] ^Ino file '/usr/local/lib/lua/5.1/loadall.so'

Screenshot:

CleanShot 2021-08-26 at 15 27 25@2x

So far I'm not sure this is actually causing issues.

Help

No

Implementation help

No response

Use vim's syntax conceal to conceal links

I've observed that neorg's link syntax does not get concealed, which could be on purpose.
Screen Shot 2021-07-29 at 15 45 41

I think though that this is a good use case for vim's built in conceal (as opposed to extmarks) because all the edge cases are handled already, a user can set their conceal cursor which controls the visibility of the concealed text so it is easy to edit. Lastly if transforming the existing text rather than replacing it then it is able to maintain normal highlights.

syntax-conceal

There is no good way to do this from lua and frankly I don't believe it is worth it to try till there is an API for it but in vimscript you could do something like what vim-markdown does.

https://github.com/plasticboy/vim-markdown/blob/8e5d86f7b85234d3d1b4207dceebc43a768ed5d4/syntax/markdown.vim#L66

Error message when opening a norg file

For some reason when opening a norg file, either by nvim name.norg or inside nvim :e name.norg I get this:
neorg
That message does not appear when opening the file through telescope,nvim though.
The error is skippable, and does not seem to have any effect.

Code blocks with @code ruby don't seem to work

Hi @vhyrro! Thanks a lot for this project, I'm really intrigued by it and I can't wait to see it grow!

I was trying out the code blocks syntax and it seems the following code doesn't highlight ruby as expected:

@code ruby
def my_method(something)
end
@end

Following #7, here I am reporting it :) Thanks again and keep up the great work!

Make Indentation More Intelligent

I've realized that as I use Neorg a lot of times the indentation is simply off. I blame this indentation engine to be so bad because of the TS parser (that is still in very early stage). If the TS parser was good, the indentation engine would use that instead of regex. It works, but it could work better. I also think that adding Control + <CR> and Alt + <CR> for special types of indentation would also be pretty cool.

I will probably have to put the current implementation to sleep in a few days' time. It will be reimplemented from scratch and will support more advanced lookback and maybe even lookahead if necessary. The goal is for it to be fairly trivial to set up any kind of new indent for Neorg. I hope I can implement this in the coming week 🤞

Completion Source for `cmp`

Welp, it happened! I've known about nvim-cmp for a pretty long time now but I didn't think the deprecation notice would come this early. Will create a new completion source for it tomorrow so you don't have to use old stuff (ew)

[BUG] Can't get Neorg working

Contributions

Plugin Version

  • I am using the latest version of the plugin

Neovim Version

  • I am using the latest neovim version (0.5)

Neovim Version

0.5 release version

Log Output

There is no log output or log file

Branch

master

Loaded modules

["core.defaults"]
["core.norg.concealer"]
["core.norg.dirman"]

Expected behavior

You can use the :Neorg command etc

Actual behavior

There is no :Neorg command or any other aspect of the plugin loaded.
The neorg git repo is cloned and sitting on my machine by packer correctly.
I can produce an error if I rm the git repo, so it is definitely being loaded by packercompiled.vim

Potentially conflicting plugins

No response

Other information

I used the code snippet in readme to set up Neorg, I also tried loading it in my init.lua and init.vim but still could not get it working

Help

No

Implementation help

No response

Fix some discrepancies

There's a few discrepancies that need fixing, and I'll get to work on them as soon as i can:

  • I accidentally didn't push the neorg.default_keybinds file, whoops!
  • There are a few links in the wiki that are dead
  • Some modules should have been removed but weren't

If you find that your neorg doesn't work as intended despite following the code snippets now you know why :P

[BUG] Assortment of bugs

Contributions

Plugin Version

  • I am using the latest version of the plugin

Neovim Version

  • I am using the latest neovim version (0.5)

Neovim Version

NVIM v0.6.0-dev+1667-g32024787b

Log Output

Not applicable

Branch

unstable

Loaded modules

Here is my setup:

require('neorg').setup {
    load = {
        ["core.defaults"] = {},
        ["core.highlights"] = {},
        ["core.integrations.telescope"] = {},
        ["core.integrations.treesitter"] = {
            config = {
                highlights = {
                    Heading = {
                        ["1"] = {
                            Title = "+TSTitle",
                            Prefix = "+TSTitle",
                        },
                    },
                },
            },
        },
        ["core.keybinds"] = {},
        ["core.norg.concealer"] = {
            config = {
                icons = {
                    heading = {
                        level_1 = {
                            icon = "",
                        },
                        level_2 = {
                            icon = "",
                        },
                        level_3 = {
                            icon = "",
                        },
                        level_4 = {
                            icon = "",
                        },
                    },
                },
            },
        },
        ["core.norg.completion"] = {
            config = {
                engine = "nvim-cmp",
            },
        },
        ["core.norg.dirman"] = {
            config = {
                workspaces = {
                    org = "~/Org",
                },
                autodetect = true,
                autochdir = true,
            },
        },
        ["core.norg.esupports"] = {},
    },
}

Expected behavior

This is an assortment of bugs which I encountered while working on #80.

Concealing

Escaped markup not always respected

The vim-regex responsible for highlighting attached modifiers can break in cases
where the char is actually escaped:
screenshot_1630081877

Concealing of - broken

- chars at the beginning of lines are being consumed. This breaks unordered
lists, tasks and links as well as the --- delimiting modifier' appearances.
screenshot_1630085927

I believe the reason for this is that pairs like -- are seen as empty
strikethrough objects which the vim regex then hides.

Link modifier should be concealed

I think the link modifier should generally be hidden, otherwise output like the
following is rather illegibile:
screenshot_1630081956

Nested quotes are not concealed

Nested quotes do not get concealed:
screenshot_1630085934

If we decide to do this, however, we need to discuss how to differentiate a
two-level quote from a drawer. One possibility is to use the box-drawing char
for quotes instead of the pipe. This looks quite nice, especially for
multi-line quotes like this one:
screenshot_1630085389

Highlighting

Missing highlighting for @embed

When encountering an @embed tag the TS parser outputs ERROR as seen below on
the bottom left:
screenshot_1630085725

Behavior

Drawers cannot be folded

I expected drawers to be one of the first objects to be foldable but this does not work right now.
Update (07. Sep 2021): Drawers are now a thing of the past. We may however introduce a @fold tag in the future.

Link following partially broken

<CR> on links does not work when the link is immediately preceded by an
opening parenthesis like this:

My awesome text ([and this reference](https://github.com/)).

Actual behavior

Inlined above

Potentially conflicting plugins

No response

Other information

No response

Help

Yes

Implementation help

I think with some minor pointers I will be able to address some of these issues.

[BUG] Can't install treesitter parsers on 0.5

Contributions

Plugin Version

  • I am using the latest version of the plugin

Neovim Version

  • I am using either 0.5 stable or the latest compiled 0.6 version

Neovim Version

0.5, Treesitter branch = 0.5 compat

Log Output

Empty..

Branch

master

Loaded modules

It's an issue with treesitter

Expected behavior

It works normally. In the past this configuration worked. I have not used this plugins for a month or so, was working fine last time. So there has been a breaking change recently.

Actual behavior

Running :TSUpdate give the following errors

❯ gcl
nvim-treesitter[norg]: Error during compilation
src/scanner.cc:94:39: error: expected expression
return std::vector({ lhs, static_cast(rhs) });
^
src/scanner.cc:97:27: warning: rvalue references are a C++11 extension [-Wc++11-extensions]
std::vector&& operator|(std::vector&& lhs, TokenType rhs)
^
src/scanner.cc:97:62: warning: rvalue references are a C++11 extension [-Wc++11-extensions]
std::vector&& operator|(std::vector&& lhs, TokenType rhs)
^
src/scanner.cc:100:16: error: rvalue reference to type 'vector<...>' cannot bind to lvalue of type 'vector<...>'
return std::move(lhs);
^~~~~~~~~~~~~~
src/scanner.cc:315:41: error: expected ';' at end of declaration list
std::vector<size_t>& get_tag_stack() noexcept { return m_TagStack; }
^
;
src/scanner.cc:551:27: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
TokenType m_LastToken = NONE;
^
src/scanner.cc:554:26: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
size_t m_ParsedChars = 0, m_IndentationLevel = 0;
^
src/scanner.cc:554:50: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
size_t m_ParsedChars = 0, m_IndentationLevel = 0;
^
src/scanner.cc:560:54: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
const std::array<int32_t, 6> s_DetachedModifiers = { '*', '-', '>', '|', '=', '~' };
^
src/scanner.cc:118:13: error: use of undeclared identifier 'advance'
advance(lexer);
^
src/scanner.cc:131:13: error: use of undeclared identifier 'advance'
advance(lexer);
^
src/scanner.cc:141:17: error: use of undeclared identifier 'advance'
advance(lexer);
^
src/scanner.cc:148:21: error: use of undeclared identifier 'advance'
advance(lexer);
^
src/scanner.cc:162:13: error: use of undeclared identifier 'advance'
advance(lexer);
^
src/scanner.cc:167:48: error: use of undeclared identifier 'm_Current'
if (lexer->lookahead == ']' && m_Current != '\')
^
src/scanner.cc:169:21: error: use of undeclared identifier 'advance'
advance(lexer);
^
src/scanner.cc:177:17: error: use of undeclared identifier 'advance'
advance(lexer);
^
src/scanner.cc:184:20: error: use of undeclared identifier 'check_link'
return check_link(lexer);
^
src/scanner.cc:188:13: error: use of undeclared identifier 'advance'
advance(lexer);
^

Potentially conflicting plugins

No response

Other information

No response

Help

No response

Implementation help

No response

[BUG] Neorg complains that compe isn't installed, but I don't want it installed

Contributions

Plugin Version

  • I am using the latest version of the plugin

Neovim Version

  • I am using the latest neovim version (0.5)

Neovim Version

NVIM v0.5.0

Log Output

Neorg never starts due to this bug so there is no log. The following is the message when opening a neorg file:

Error detected while processing /home/kat/.local/share/nvim/site/pack/packer/start/aniseed/plugin/aniseed
.vim:                                                                                                    
line    2:                                                                                               
E5108: Error executing lua [string "luaeval()"]:1: Vim(echoerr):E15: Invalid expression: ...ua/neorg/modu
les/core/integrations/nvim-compe/module.lua:22: nvim-compe not found, aborting...

Branch

master

Loaded modules

Lua compiled from fennel

(require("neorg")).setup( {load = {
  ["core.defaults"] = {}, 
  ["core.keybinds"] = {config = {default_keybinds = true, neorg_leader = "<Leader>n"}}, 
  ["core.norg.concealer"] = {}, 
  ["core.norg.dirman"] = {config = {autochdir = true, autodetect = true, workspaces = {my_workspace = "~/neorg"}}}}})

Expected behavior

Neorg should start without nvim-compe just fine

Actual behavior

Neorg never starts because it expects nvim-compe

Potentially conflicting plugins

No response

Other information

I am compiling from fennel, but I cannot see a way for the fennel compilation to interfere with Neorg

Help

Yes

Implementation help

No response

DOCUMENTATION UPDATES

I believe it's important that I keep this issue up until the release of 0.1. As we approach that milestone closer and closer every day I can't possibly keep updating the docs every single time I make a small change. That's why I've decided to just stop updating the documentation until I feel that our feature set is where I want it to be for the first release. After that happens I will then overhaul the README and the wiki. For you this unfortunately means that without some experience in reading code you're gonna have a bit of a bad time if you're using unstable :P

If I make a big or significant change then I will post it here. I know it's a bit late but it just occurred to me that this is a good method of informing users about changes without having to update the entirety of the docs lol

I think the most important changes are related to the file format:

  • /this/ is now italic
  • _this_ is underline
  • [NOTE: This is a temporary change] tags (marked with @) need to stay at the beginning of a line. You'll see that if you have realtime indentation enabled Neorg will do this for you. The reason is that until our magical treesitter parser does not become waay more intelligent parsing the contents of tags is an absolute disaster. You have to account for extra indentation, tabs vs spaces etc.. It's horrid.

After all wiki documentation is complete all of the markdown files will be ran through a converter to convert them to vim help files so you can easily access them from the comfort of your favourite editor :)

Code block colors

image

The color for code blocks seems to be hard coded to brown, which I think will not necessarily work for a lot of colorschemes. I think a simpler solution would be to link to a common highlight group but since it's not really clear what highlight group will necessarily be darker than the Normal background color, what I do in my plugins is use a function which darkens the hex value of the normal background, so it works for most colour schemes without depending on a potentially absent highlight group.

https://github.com/akinsho/nvim-bufferline.lua/blob/fec44821eededceadb9cc25bc610e5114510a364/lua/bufferline/colors.lua#L10-L33

I've also noted that the points after I insert a new line aren't highlighted, no idea why haven't looked into it at all, but just thought I'd mention.

docs: clarify if packer is required, or suggested, for installation

This looks interesting but I'm still trying to grok the installation instructions. You list "Packer:" which to the uninitiated (me!) looks like one bundle manager amongst many (I currently use pathogen). It's not clear whether Packer is a hard requirement, or merely a suggestion, and it would be good to clarify that.

I don't see any clear indication as to which Neovim versions are supported, but Packer has >= 0.5.0 (which is newer than Debian have managed to package so far, for example), so if Packer is a hard requirement than that's a transitive minimum Neovim version for neorg, too.

List of supported syntax?

Hi! I have been trying to find a note-taking plugin for neovim that will work for me, and I think this may be it. I am excited to see how this progresses and would even like to try and help contribute if possible. Right now, though, what I am struggling with is understanding what the syntax is to do even just the basics.

Is the syntax a superset/modified version of Markdown?

neorg-roam telescope and improvement?

hello, this might be helpful for a simple telescope function for people to setup their notebook location, maybe people could also share what they used for neorg here:

function neorg_roam()
  require('telescope.builtin').find_files({
    prompt_title = "Notebook";
    cwd = "~/path/to/neorg";
  })
end

and also I think https://github.com/folke/todo-comments.nvim plugin can also help with colorizing some stuff so it's more integrated as a notebook and as a little fancy notebook for others to start using it (maybe better than what emacs org did), I didn't know if it's mentioned elsewhere, but might be a good idea.

thank you for this awesome plugin!

[BUG] `vim.opt_local` is nil

Contributions

Plugin Version

  • I am using the latest version of the plugin

Neovim Version

  • I am using the latest neovim version (0.5)

Neovim Version

NVIM v0.5.0-dev+1357-g192f89ea1 (on Win10)

Log Output

No such file available

Branch

master

Loaded modules

lua << EOF
    require('neorg').setup {
        -- Tell Neorg what modules to load
        load = {
            ["core.defaults"] = {}, -- Load all the default modules
            ["core.norg.concealer"] = {}, -- Allows for use of icons
            ["core.norg.dirman"] = { -- Manage your directories with Neorg
               config = {
                    workspaces = {
                        my_workspace = "~/neorg"
                    }
                }
            }
       },
    }

Expected behavior

No errors when opening an norg file.

Actual behavior

When opening an norg file (:e c:\tmp\foo.norg) I get the following error:
image

It seems like vim.opt_local is nil for some reason. As far as I can tell from the neovim documentaiton, it should be available so maybe this issue should go there instead?

Potentially conflicting plugins

No response

Other information

No response

Help

No

Implementation help

No response

[SUGGESTION] Reuse selection popup

Issues

  • I have checked existing issues and there are no existing ones with the same request.

Feature description

Hi there!

Cool project :) I've recently migrated and liking it a lot so far.

One thought I've had looking at #60 is to maybe reuse neogits popup builder system, which looks amazing. Ideally, the system could be upstreamed to plenary such that other projects (including neorg) can lever it. I'm suggesting this of course hoping neogit's maintainer would be OK with this (cc @TimUntersberger)

As initial references:

Help

No

Implementation help

I'd be able to, but helping to maintain and adding features to telescope already takes a lot of my time 😅

But maybe I can look into this some time :)

Getting weird errors on autocommands for *.norg

Are you experiencing errors after updating the plugin to the latest version, and are getting an error along the lines of:

E5108: Error executing lua [string "luaeval()"]:1: Vim(echoerr):E121: Undefined variable: Failed                                                                                                                    
Error detected while processing BufEnter Autocommands for "*.norg":                                                                                                                                                 
E5108: Error executing lua Failed to load parser: uv_dlopen: /home/vhyrro/.local/share/nvim/site/pack/packer/start/nvim-treesitter/parser/norg.so: undefined symbol: tree_sitter_norg_external_scanner_create          
Error detected while processing BufEnter Autocommands for "*":                                                                                                                                                      
E5108: Error executing lua Failed to load parser: uv_dlopen: /home/vhyrro/.local/share/nvim/site/pack/packer/start/nvim-treesitter/parser/norg.so: undefined symbol: tree_sitter_norg_external_scanner_create          
Error detected while processing CursorMoved Autocommands for "*":                                                                                                                                                   
E5108: Error executing lua ...start/nvim-treesitter-context/lua/treesitter-context.lua:236: Vim(lua):E5108: Error executing lua Failed to load parser: uv_dlopen: /home/vhyrrolocal/share/nvim/site/pack/packer/start
/nvim-treesitter/parser/norg.so: undefined symbol: tree_sitter_norg_external_scanner_create                                                                                                                         
Error detected while processing WinScrolled Autocommands for "*":                                                                                                                                                   
E5108: Error executing lua Failed to load parser: uv_dlopen: /home/vhyrro/.local/share/nvim/site/pack/packer/start/nvim-treesitter/parser/norg.so: undefined symbol: tree_sitter_norg_external_scanner_create          
Failed to get context: Failed to load parser: uv_dlopen: /home/vhyrro/.local/share/nvim/site/pack/packer/start/nvim-treesitter/parser/norg.so: undefined symbol: tree_sitter_norg_external_scanner_create     

Fear no more! Simply take a look at the readme present in the unstable branch and scroll down to the treesitter installation section. We've slightly changed the code snippet as the new parser we're using also includes a scanner. After you've taken that code and replaced it in your own config run :TSUpdate and voila!

Literate config files.

So it is a simple question can we do a Literate config " Literate programming" my init.lua in neorg like emacs with org-mode.

That would be cool so I can organize my giant config file.

I'll be watching this project closely.

Also take my Stare.

Edite: Fix spelling.

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.