Code Monkey home page Code Monkey logo

gkeep.nvim's Introduction

Gkeep.nvim

Neovim integration for Google Keep, built using gkeepapi

Screenshot from 2021-07-30 16-25-39

Requirements

  • Neovim 0.5
  • Python 3.6+
  • A patched font (optional. Used for icons)

Table of Contents

Installation

gkeep supports all the usual plugin managers

lazy.nvim
{
  'stevearc/gkeep.nvim',
  build = "UpdateRemotePlugins",
  opts = {},
  -- Optional dependencies
  dependencies = { "nvim-tree/nvim-web-devicons" },
}
Packer
require('packer').startup(function()
    use {'stevearc/gkeep.nvim', run = ':UpdateRemotePlugins'}
end)
Paq
require "paq" {
    {'stevearc/gkeep.nvim', run = vim.fn['remote#host#UpdateRemotePlugins']};
}
vim-plug
Plug 'stevearc/gkeep.nvim', { 'do': ':UpdateRemotePlugins' }
dein
call dein#add('stevearc/gkeep.nvim')
Pathogen
git clone --depth=1 https://github.com/stevearc/gkeep.nvim.git ~/.vim/bundle/
Neovim native package
git clone --depth=1 https://github.com/stevearc/gkeep.nvim.git \
  "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/pack/gkeep/start/gkeep.nvim

Post-install, you will need to run :UpdateRemotePlugins if your installer hasn't done so automatically.

gkeep.nvim also depends on the gkeepapi and keyring python libraries. It will attempt to install those automatically, but if it fails you will need to find the python3 executable that neovim is using (if you're not sure, run :checkhealth provider) and run python3 -m pip install gkeepapi keyring. If you are NOT using python 3.8+, you will also need to pip install typing-extensions.

Run :checkhealth gkeep to confirm everything is set up properly

A note about keyring:
Keyring is required to store your Google auth token securely. In most cases it will work automatically, but if you see an error in your :checkhealth output, you may need to fiddle with the setup. See the keyring repo for details about the supported backends. Take note of the special instructions for running on headless systems or in a docker container if it applies to you. If you absolutely cannot get any of the supported backends working, you can pip install keyrings.alt to use an insecure backend, though this has negative security implications.

Setup

No configuration is necessary to get started, simply run :GkeepLogin. It will prompt you for an email and password (if you use 2-factor, you will need to provide an app password).

The API master token is stored using keyring so you don't have to enter your password again. To remove the stored credentials from your system, run :GkeepLogout.

Commands

Command Args Description
:GkeepLogin [{email}] Login to Google Keep
:GkeepLogout Log out and clear stored credentials
:GkeepOpen [right/left] Open the gkeep windows
:GkeepEnter [menu/list], [right/left] Open and enter the gkeep windows
:GkeepClose Close the gkeep windows
:GkeepToggle [right/left] Open or close the gkeep windows
:GkeepNew [note/list/neorg], [{title}] Create a new note
:GkeepSync Sync changes with the server
:GkeepRefresh Force fetch latest notes from server
:GkeepGoto Open the note link under the cursor (see links)
:GkeepBrowse Open the note in your web browser
:GkeepPopup Open a float window for the current note to perform edits (e.g. pin/archive/delete)
:GkeepYank Copy a document link to the current note (see links)
:GkeepUpdateLinks Updates links in the note to match their titles
:GkeepCheck Toggle the checkbox of the item under cursor (see list notes)
:GkeepSortChecked Sorts completed items to the bottom of the list
:GkeepClearChecked Deletes completed items from the list

Additionally, there is the function GkeepStatus() which returns the current status message (usually about syncing notes). This can be used in your statusline if desired.

Configuration

Set the following global variables to configure gkeep.

Variable Type Default Description
g:gkeep_sync_dir string null The directory to sync notes into (see file sync below)
g:gkeep_sync_archived bool false If true, will sync archived notes as well
g:gkeep_nerd_font bool true When true, will use icons from your patched font
g:gkeep_icons dict See config.py Override the icons used
g:gkeep_width int 32 Set the width of the sidebar
g:gkeep_log_levels dict {'gkeep': 'warning', 'gkeepapi': 'warning'} Python log levels. See logging levels for a list of levels

Note that these variables must be set before gkeep is loaded in order for them to take effect.

Features

Menu

Screenshot from 2021-07-30 16-19-20

The Menu is the top window that displays your labels and searches. Use ? to view all the keymaps available. The main features include:

  • Search your notes
  • Save/edit/delete searches
  • Create/edit/delete labels

Note list

Screenshot from 2021-07-30 16-22-56

The Note list is the bottom window that displays the notes that match the currently-selected menu item (label, search, etc). Use ? to view all the keymaps available. The main features include:

  • Open notes
  • Archive or delete notes
  • Create new notes
  • Change the note type or color
  • Change the sort order

Note editing

Notes will have the title, id, and labels at the top like so:

# My note

id: 1626733972853.1206798729
labels: First label, Another label

To change the note title, simply edit the file and :w. The same goes for labels. If the note doesn't have any labels yet, manually add the labels: line and they will be picked up when you save. Do not change the id: line.

There is an omnicomplete function (<C-x><C-o>) that will complete the labels for you

Note: if you are using file sync, renaming files will not rename the note. Changing the note title will rename the file.

Lists

Google Keep has a special type of note to represent lists, and gkeep customizes the editing environment heavily to enforce the proper format. You may wish to bind :GkeepCheck to a convenient keymap.

list.mp4

Links

You can embed links to other notes within a note. The format for a link is [visible text](note_id). You can quickly get a link to a note using the :GkeepYank command. To jump to a link under your cursor, use the :GkeepGoto command (bound to gf by default).

You can also use the ephemeral url format for links if you like (e.g. gkeep://{id}/{visible_text})

link.mp4

Search

Searching notes is done from the Menu. Pressing / in the menu will pop open the search prompt. As you type, the Note list should live-update to show the search results.

search.mp4

The search is case-insensitive, and will look for matches in the note title and text. Matching is exact, not fuzzy.

Flags

There is a special syntax to let you filter notes by type. Notes can be [p]inned, [a]rchived, or [t]rashed. You can use the following flags to specify the desired behavior:

  • -: Exclude notes of the specified type
  • +: Include notes of the specified type
  • =: Only show notes of the specified type
╭─────────────╮
│🔍 -p        │  // Exclude pinned notes from the search
╰─────────────╯
╭─────────────╮
│🔍 =a        │  // Only search archived notes
╰─────────────╯
╭─────────────╮
│🔍 +at       │  // Search all notes, including archived and trashed
╰─────────────╯

The default query functions like -at, to filter out archived and trashed notes.

Flags can be added to any part of the query. Gkeep will search for any text that is not the flag.

╭─────────────╮
│🔍 +a vim +t │  // Search all notes (including archived and trashed) for 'vim'
╰─────────────╯

Labels and colors

You can search for notes with a specific label or color by using label:<label> and color:<color>. This can be abbreviated as l:<label> and c:<color>. To specify multiple labels or colors, separate them with a comma.

╭────────────────────────╮
│🔍 l:software,journal   │  // Search notes with either label
╰────────────────────────╯
╭────────────────────────╮
│🔍 c:red,blue           │  // Search red and blue notes
╰────────────────────────╯

If your label has whitespace or special characters, you can quote it. Note that you cannot comma-separate quoted labels, so to search multiple you will need to provide label: multiple times.

╭──────────────────────────────────────────╮
│🔍 l:"journal entries" l:"project ideas"  │
╰──────────────────────────────────────────╯

You do not need to specify the entire label in a query, only a unique prefix. For example, if you have the labels software, vim, and journal, you could search for the software label with l:s, since no other labels start with "s".

Examples

Some more query examples:

  • vim l:software +a - Search for vim among notes with the software label, including archived notes
  • code outline l:software,vim c:red - Search red notes with either a software or vim label that contain the text "code outline"

Ephemeral notes

The default operation for gkeep is to not save your files to disk. The note data will be cached locally in a json file (under neovim's cache directory), but no note files will exist directly. Notes are accessed by using a buffer name that looks like gkeep://{id}/{title}.keep. These buffers can be edited and saved like a normal file, and they will sync those changes to Google Keep.

File sync

If you set let g:gkeep_sync_dir = '~/notes' gkeep will write all your notes to that directory and attempt to keep them in sync. It will also scan that directory for new files and create notes in Google Keep for them. Note files must use the .keep extension to be detected (or .norg if using Neorg).

Merge conflicts

If the Google Keep servers and your local files disagree about the content of a note, the file on your computer will be renamed to <filename>.local and the original file will be updated to the server latest. When a .local file is present, the note will appear with a red "merge" icon in the list:

Screenshot from 2021-07-30 16-23-58

If you open the note, it will open in a vimdiff split. Resolve the merge conflict and then delete the .local file to get back to a good state.

Changing files outside of vim

You can make edits to the synced note files outside of vim, and the changes will be picked up and synced the next time you open vim (and start gkeep). To protect you from data loss, when gkeep detects changes that are made from outside of vim, a backup of the note will be made in Google Keep before uploading those changes. Backups will appear in your Trash (and thus will be deleted after 7 days), and will have [Backup] in the title.

Third-party integrations

Telescope

If you have telescope installed, you can use it to search and select your notes. There are two pickers that you can use:

  • :Telescope gkeep - Search for and open a note
  • :Telescope gkeep link - Search for a note and insert a link to it at the current cursor position (see links)

Additionally, each of these pickers can be configured to use a different type of search. The two options are:

  • "all_text" - Searches the title and contents of all notes and uses the same query syntax as the search function. With this method, the searching happens in a thread in python and asynchronously reports results to telescope, which does a minimal amount of sorting.
  • "title" - Searches only the titles of notes. With this method, telescope fetches the note titles from the python process and sorts/filters like usual.
require("telescope").setup({
  -- You can optionally configure the search method for each of the pickers.
  -- Below are the default values.
  extensions = {
    gkeep = {
      find_method = "all_text",
      link_method = "title",
    },
  },
})
-- Load the extension
require('telescope').load_extension('gkeep')

Neorg

If you have neorg installed, gkeep will automatically enable support for it (check that it's working with :checkhealth gkeep). You will then be able to use the note list to create Neorg notes or change existing notes to be Neorg notes. Gkeep will interact minimally with the @document.meta tag, but otherwise it will simply function as a storage backend for your notes.

@document.meta
gkeep cares about three entries in the document meta:

  • title: This will be used as the title of the note.
  • categories: Gkeep will look for labels in here. Note that the neorg spec specifies that categories are space-separated. Gkeep will handle it if your labels have spaces in them. You can also add categories here that are not Google Keep labels and gkeep will ignore them.
  • gkeep: Gkeep stores the ID of the note here. Do not remove it or you will end up creating duplicate notes.

Changing the title: and categories: will edit the note title and labels, just like for a normal note.

Highlight

The following highlight groups can be overridden

Group Description
GkeepStatus The status string in the upper right of the menu
GKeepRed The color of Red note icons
GKeepOrange The color of Orange note icons
GKeepYellow The color of Yellow note icons
GKeepGreen The color of Green note icons
GKeepTeal The color of Teal note icons
GKeepBlue The color of Blue note icons
GKeepDarkBlue The color of DarkBlue note icons
GKeepPurple The color of Purple note icons
GKeepPink The color of Pink note icons
GKeepBrown The color of Brown note icons
GKeepGray The color of Gray note icons

FAQ

Q: Why Google Keep?

It has a good mobile UI. I like editing notes in vim on my desktop, but I also want to be able to access them on my phone.

Q: Why not use the official Google Keep API?

Google has recently released an official API for Google Keep. Since gkeep.nvim has roughly two different modes of operation, let's evaluate it for each:

  • With notes synced as files: The API has no concept of 'versions' or delta updates like gkeepapi. This means that in order to keep the files in sync, we would have to check every single one of them against the cloud version on startup. This is prohibitively time consuming and wasteful of CPU and bandwidth.
  • With ephemeral notes, no files: On the surface the API should be great for this, but it is lacking key features that we want. The biggest missing pieces are search and labels, without which we would have no way to navigate notes except scrolling down a list.

If the API gets updated in the future to better support one or both of these workflows, I'll consider migrating to it.

Q: What Google Keep features are not supported?

These are Google Keep features that are currently unsupported by gkeep.

  • attachments
  • collaborators
  • reminders

Troubleshooting

Trouble logging in

Symptom: When you try to :GkeepLogin a browser window is opened and hangs on "one moment please...".

Action: You are probably trying to log in with a password instead of an app password. Create an app password and use that instead. See #7 for details.

gkeep.nvim's People

Contributors

dundargoc avatar stevearc avatar stevearc-stripe 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

gkeep.nvim's Issues

Cannot search with Telescope

Describe the bug
Cannot search notes with telescope, following errors are shown:

error caught while executing async callback:
NvimError("Error executing lua: ...escope-fzf-native.nvim/lua/telescope/_extensions/fzf.lua:25: attempt to index field 'prompt_cache' (a nil value)")
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/pynvim/api/nvim.py", line 320, in exec_lua
    return self.request('nvim_execute_lua', code, args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/pynvim/api/nvim.py", line 182, in request
    res = self._session.request(name, *args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/pynvim/msgpack_rpc/session.py", line 102, in request
    raise self.error_wrapper(err)
pynvim.api.common.NvimError: Error executing lua: ...escope-fzf-native.nvim/lua/telescope/_extensions/fzf.lua:25: attempt to index field 'prompt_cache' (a nil value)

the call was requested at
  File "/Users/piotr_serafin/.local/share/nvim/site/pack/packer/start/gkeep.nvim/rplugin/python3/gkeep/thread_util.py", line 56, in w
    func(*args, **kwargs)
  File "/Users/piotr_serafin/.local/share/nvim/site/pack/packer/start/gkeep.nvim/rplugin/python3/gkeep/status.py", line 43, in d
    return f(*args, **kwargs)
  File "/Users/piotr_serafin/.local/share/nvim/site/pack/packer/start/gkeep.nvim/rplugin/python3/gkeep/api.py", line 186, in run_search
    callback()
  File "/Users/piotr_serafin/.local/share/nvim/site/pack/packer/start/gkeep.nvim/rplugin/python3/gkeep/plugin.py", line 501, in respond
    self._vim.async_call(

To Reproduce
Steps to reproduce the behavior:

  1. Perform succesfull GkeepLogin
  2. Add telescope integration by adding: require('telescope').load_extension('gkeep')
  3. Execute :Telescope gkeep
  4. See error

Expected behavior
List of notes available in Telescope window

Version information

  • OS: mac
  • Neovim:
NVIM v0.5.1
Build type: Release
LuaJIT 2.1.0-beta3
Compilation: clang -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DNVIM_TS_HAS_SET_MATCH_LIMIT -O2 -DNDEBUG -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -DMIN_LOG_LEVEL=3 -I/tmp/neovim-20210927-1441-demfsz/neovim-0.5.1/build/config -I/tmp/neovim-20210927-1441-demfsz/neovim-0.5.1/src -I/usr/local/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include -I/usr/local/opt/gettext/include -I/tmp/neovim-20210927-1441-demfsz/neovim-0.5.1/build/src/nvim/auto -I/tmp/neovim-20210927-1441-demfsz/neovim-0.5.1/build/include
Compiled by brew@BigSur

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

  system vimrc file: "$VIM/sysinit.vim"
 fall-back for $VIM: "/usr/local/Cellar/neovim/0.5.1/share/nvim"
  • Gkeep:

health#gkeep#check
========================================================================
## gkeep
 - OK: gkeepapi 0.13.6 installed
 - OK: keyring installed
 - OK: Logged in as pio*************@gmail.com
 - INFO: Log file: /Users/piotr_serafin/.cache/nvim/gkeep.log

Additional context
Configured telescope extensions

require('telescope').load_extension('fzf')
require('telescope').load_extension('dap')
require('telescope').load_extension('gkeep')

Screenshots
image

Uninstalled plugin but keep getting an error on opening vim

Describe the bug
I removed this plugin using PlugClean but now when I enter (neo)vim I get the following error:

Error detected while processing BufEnter Autocommands for "*"..function remote#define#AutocmdBootstrap[7]..BufEnter Autocommands for "*"..function remote#define#request:
line    2:
Error invoking '/Users/xxx/.local/share/nvim/plugged/gkeep.nvim/rplugin/python3/gkeep:autocmd:BufEnter:*' on channel 3 (python3-rplugin-host):
no request handler registered for "/Users/xxx/.local/share/nvim/plugged/gkeep.nvim/rplugin/python3/gkeep:autocmd:BufEnter:*"

I've no idea where this is coming from or how I can stop it coming up. I've tried clearing autocommands with :autocmd! but no luck. I can see this process keeps getting spawned even after I kill it

ps aux | grep gkeep
xxx     1884   0.0  0.1  4261132  12420   ??  Ss    8:50pm   0:00.13 /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/Resources/Python.app/Contents/MacOS/Python -c import sys; sys.path = [p for p in sys.path if p != ""]; import neovim; neovim.start_host() /Users/xxx/.local/share/nvim/plugged/gkeep.nvim/rplugin/python3/gkeep

I've also tried restarting iTerm2 and my laptop but no progress. Is there some pynvim cache I need to clear somewhere? I'm all out of ideas, any help welcome. Thanks

Version information

  • OS: mac
  • Neovim: NVIM v0.8.0

typing_extensions

Describe the bug
Running :UpdateRemotePlugins, there is an error that the python package typing_extensions is not recognised. Therefore to fix this I had to manually pip install typing_extensions before using this plugin.

To Reproduce
Steps to reproduce the behavior:
If typing_extensions is not already installed, then :UpdateRemotePlugins won't work.

Expected behavior
Perhaps there's an issue with the install of the requirements for python packages within the script. I'm not sure exactly where but perhaps they need to be updated?

Version information

  • OS: linux
  • Neovim: 0.9.5
  • Gkeep: (all okay after pip install "typing_extensions")

EDIT: For more information the plugin worked fine prior to the commit 5d20831 , therefore an additional python package I had to install prior to the plugin working. And this is just an FYI, the problem is already resolved for me after pip installing typing_extensions.

Not an editor command: UpdateRemotePlugins

Describe the bug
UpdateRemotePlugins is absent.

Version information

  • OS: macOS 12.1
  • Neovim:
NVIM v0.6.0
Build type: Release
LuaJIT 2.1.0-beta3
Compiled by brew@BigSur

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

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/local/Cellar/neovim/0.6.0/share/nvim"
  • Gkeep:
  gkeep: health#gkeep#check
  ========================================================================
  ## gkeep
  │ - OK: gkeepapi 0.13.7 installed
  │ - OK: keyring installed
  │ - ERROR: Remote plugin not found
  │   - ADVICE:
  │   │ - Try running :UpdateRemotePlugins and restart

setup function is nil

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Add gkeep.nvim example lazy config to nvim 0.10
  2. Start nvim and sync/update lazy
  3. Restart nvim

receive message:

Failed to run `config` for gkeep.nvim
 .../Local/nvim-data/lazy/lazy.nvim/lua/lazy/core/loader.lua:373: attempt to call field 'setup' (a nil value) 
 # stacktrace: - init.lua:260

Expected behavior
gkeep would load without error

Version information

  • OS: [e.g. linux, mac, windows]
    • Windows 11 Pro
  • Neovim: [output of nvim -v]
    • NVIM v0.10.0-dev-2826+gf6dcc464f
  • Gkeep: [output of :checkhealth gkeep]
gkeep: health#gkeep#check

gkeep ~
- OK gkeepapi 0.15.1 installed
- OK gpsoauth 1.0.4 installed
- OK urllib3 1.26.18 installed
- OK keyring installed
- ERROR Remote plugin not found
  - ADVICE:
    - Try running :UpdateRemotePlugins and restart

Additional context
I'm not sure if this is related to the lack of setup, but I don't get any plugins listed in the rplugin.vim after running UpdateRemotePlugins

Unable to login

Describe the bug
Unable to login. After I enter my email, I get the error. I'm not prompted for
any password.

To Reproduce
Steps to reproduce the behavior:

  1. Run command 'GkeepLogin'
  2. See error:
Error detected while processing function _gkeep_prompt_close[1]..remote#define#request:
line    2:
Error invoking '/home/zim/.local/share/nvim/site/pack/packer/start/gkeep.nvim/rplugin/python3/gkeep:function:_gkeep_prompt_
close' on channel 3 (python3-rplugin-host):
error caught in request handler '/home/zim/.local/share/nvim/site/pack/packer/start/gkeep.nvim/rplugin/python3/gkeep:functi
on:_gkeep_prompt_close [['[email protected]']]':
Traceback (most recent call last):
  File "/home/zim/.local/share/nvim/site/pack/packer/start/gkeep.nvim/rplugin/python3/gkeep/plugin.py", line 44, in d
    return f(self, *args[0])
  File "/home/zim/.local/share/nvim/site/pack/packer/start/gkeep.nvim/rplugin/python3/gkeep/plugin.py", line 78, in w
    f(self, *args, **kwargs)
  File "/home/zim/.local/share/nvim/site/pack/packer/start/gkeep.nvim/rplugin/python3/gkeep/plugin.py", line 352, in close_
prompt
    self._modal.prompt.close(text)
  File "/home/zim/.local/share/nvim/site/pack/packer/start/gkeep.nvim/rplugin/python3/gkeep/modal/prompt.py", line 66, in c
lose
    callback(text)
  File "/home/zim/.local/share/nvim/site/pack/packer/start/gkeep.nvim/rplugin/python3/gkeep/plugin.py", line 78, in w
    f(self, *args, **kwargs)
  File "/home/zim/.local/share/nvim/site/pack/packer/start/gkeep.nvim/rplugin/python3/gkeep/plugin.py", line 45, in d
    return f(self, *args)
  File "/home/zim/.local/share/nvim/site/pack/packer/start/gkeep.nvim/rplugin/python3/gkeep/plugin.py", line 612, in cmd_lo
gin
    token = keyring.get_password("google-keep-token", email)
  File "/home/zim/.local/lib/python3.10/site-packages/keyring/core.py", line 55, in get_password
    return get_keyring().get_password(service_name, username)
  File "/home/zim/.local/lib/python3.10/site-packages/keyring/backends/libsecret.py", line 62, in get_password
    items = Secret.password_search_sync(
gi.repository.GLib.GError: g-dbus-error-quark: The name org.freedesktop.secrets was not provided by any .service files (2)

Expected behavior
A clear and concise description of what you expected to happen.

Version information

  • Linux arch 5.15.10-zen1-1-zen #1 ZEN SMP PREEMPT Fri, 17 Dec 2021 11:17:39 +0000 x86_64 GNU/Linux
  • neovim version
NVIM v0.6.0
Build type: Release
LuaJIT 2.0.5
Compiled by builduser

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

  system vimrc file: "$VIM/sysinit.vim"
 fall-back for $VIM: "/usr/share/nvim"

Run :checkhealth for more info
  • Gkeep:
gkeep: health#gkeep#check
========================================================================
## gkeep
 - OK: gkeepapi 0.13.7 installed
 - OK: keyring installed
 - WARNING: Not logged in
   - ADVICE:
     - Try :GkeepLogin
 - INFO: Log file: /home/zim/.cache/nvim/gkeep.log

Unable to login

Describe the bug
When running the GkeepLogin command, I pass in the email address and password, all authentication processes are taken place, but then nothing happens. Webpage shows One moment please but never goes past that

To Reproduce
Steps to reproduce the behavior:

  1. Go to nvim

  2. Run command 'GkeepLogin'
    2021-11-28-181127_1920x1080_scrot

  3. See error: None

Expected behavior
A clear and concise description of what you expected to happen.

Login to gkeep and see gkeep notes

Version information

  • arch linux
  • Neovim: v0.5.1
  • Gkeep: 0.13.6

Additional context
Add any other context about the problem here.

Screenshots

Failed to log in: incorrect password

Describe the bug
I'm unable to login to my gmail account using gkeep.nvim. When running :GkeepLogin I get prompted for e-mail and password, but the only message I get is

Failed to log in: incorrect password

Expected behavior
Being able to log in.

Version information

  • OS: Ubuntu 22.04.1 LTS (jammy)
  • Neovim:
NVIM v0.7.2
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3
Compilation: /usr/bin/gcc-11 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DNVIM_TS_HAS_SET_MATCH_LIMIT -DNVIM_TS_HAS_SET_ALLOCATOR -O2 -g -Og -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wdouble-promotion -Wmissing-noreturn -Wmissing-format-attribute -Wmissing-prototypes -Wimplicit-fallthrough -Wsuggest-attribute=pure -Wsuggest-attribute=const -Wsuggest-attribute=malloc -Wsuggest-attribute=cold -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=always -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -DMIN_LOG_LEVEL=3 -I/home/runner/work/neovim/neovim/build/config -I/home/runner/work/neovim/neovim/src -I/home/runner/work/neovim/neovim/.deps/usr/include -I/usr/include -I/home/runner/work/neovim/neovim/build/src/nvim/auto -I/home/runner/work/neovim/neovim/build/include
Compiled by runner@fv-az395-591

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

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "
/home/runner/work/neovim/neovim/build/nvim.AppDir/usr/share/nvim"
  • Gkeep:
gkeep: health#gkeep#check
========================================================================
## gkeep
 - OK: gkeepapi 0.14.2 installed
 - OK: gpsoauth 1.0.2 installed
 - OK: keyring installed
 - WARNING: Not logged in
   - ADVICE:
     - Try :GkeepLogin
 - INFO: Log file: /home/david/.cache/nvim/gkeep.log

Additional context
I have tried both disabling 2FA and using an App Password, but I still have the same problem.

I created a minimal vim.init and loaded it with nvim -u ~/.config/nvim/gkeep.vim, so there shouldn't be any other configuration interfering.

The gkeep.log file is empty.

Unable to Login

Describe the bug
I removed my app-password in my google account and logged out of the device due to some security reasons. Later changed my google password. When I tried to re-open gkeep notes, it asked to login using :GkeepLogin. It asked me for the app password. I entered a new one that I generated. It said 'Complete login flow in browser, then re-attempt GkeepLogin'. It launched a browser session which asks me to login to my google account, in case not already logged in. And nothing else happens in the neovim window

To Reproduce
Steps to reproduce the behavior:

  1. Remove app password and logout of device.
  2. Change your google account password
  3. Open you gkeep notes in neovim.
  4. Try :GkeepLogin

Expected behavior
It should open my notes.

Version information

  • OS: [e.g. linux, mac, windows]
    NAME="Ubuntu"
    VERSION="20.04.4 LTS (Focal Fossa)"

  • Neovim: [output of nvim -v]
    VIM v0.8.0-dev
    Build type: RelWithDebInfo
    LuaJIT 2.1.0-beta3

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

system vimrc file: "$VIM/sysinit.vim"
fall-back for $VIM: "/usr/share/nvim"

  • Gkeep: [output of :checkhealth gkeep]

gkeep

  • OK: gkeepapi 0.13.7 installed
  • OK: keyring installed
  • WARNING: Not logged in
    • ADVICE:
      • Try :GkeepLogin
  • INFO: Syncing notes to /home/bhanu/work/gkeep
  • INFO: Log file: /home/bhanu/.cache/nvim/gkeep.log

Can't use neovim after I deleted plugin's directory

Describe the bug
Ok, after I've run PlugClean command (I use vim-plug) to delete all unused directories in plugged folder, each time I open neovim, it shows the same error

To Reproduce
Steps to reproduce the behavior:

  1. Install plugin
  2. Remove plugin from list
  3. Run :PlugClean
  4. Open neovim

Expected behavior
Neovim as usual without this error

Version information

  • OS: linux
  • Neovim: v0.5.1

Additional context
I installed gkeepapi and keyring via pip and after I've removed plugin, I uninstalled them as well.

Screenshots
image

Unable to access gkeep notes via nvim after removing linked device on google account

Describe the bug
I removed the linked device from my google account for security reasons. Later when I tried to access my gkeep notes, I saw the message "Log in with GkeepLogin". When I tried the same, it says that I'm already logged in, but my notes aren't listed. Checkhealth shows that I'm "not logged in but auth token exists".

To Reproduce
Steps to reproduce the behavior:

  1. Remove the linked device on your google account
  2. Run command ':GkeepEnter'. I see Home, Archive and Trash listed, but none of my existing notes are listed. I see a message next to Home which says 'Log in with GkeepLogin'.
  3. Run command ':GkeepLogin'. Output : 'Gkeep logged in ********@gmail.com', i.e, my email address.
  4. Run command ':GkeepOpen'. Output : No response seen. The content on the screen does not change.
  5. Run command ':GkeepRefresh'. Output : 'Cannot perform action while Gkeep is Uninitialized'

Expected behavior
It should ask me for my password or app password to re-login.

Version information

  • OS: [e.g. linux, mac, windows]
    Ubuntu 20.04

  • Neovim: [output of nvim -v]
    NVIM v0.7.0-dev
    Build type: RelWithDebInfo
    LuaJIT 2.1.0-beta3
    Compilation: /usr/bin/cc -g -O2 -fdebug-prefix-map=/build/neovim-wE2acI/neovim-0.7.0ubuntu1+git202203171546-d238b8f60-dd05b3569=. -fstack-protector-strong -Wformat -Werror=format-security -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DNVIM_TS_HAS_SET_MATCH_LIMIT -DNVIM_TS_HAS_SET_ALLOCATOR -O2 -g -Og -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -DMIN_LOG_LEVEL=3 -I/build/neovim-wE2acI/neovim-0.7.0ubuntu1+git202203171546-d238b8f60-dd05b3569/build/config -I/build/neovim-wE2acI/neovim-0.7.0ubuntu1+git202203171546-d238b8f60-dd05b3569/src -I/build/neovim-wE2acI/neovim-0.7.0ubuntu1+git202203171546-d238b8f60-dd05b3569/.deps/usr/include -I/usr/include -I/build/neovim-wE2acI/neovim-0.7.0ubuntu1+git202203171546-d238b8f60-dd05b3569/build/src/nvim/auto -I/build/neovim-wE2acI/neovim-0.7.0ubuntu1+git202203171546-d238b8f60-dd05b3569/build/include
    Compiled by buildd@lcy02-amd64-051

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

system vimrc file: "$VIM/sysinit.vim"
fall-back for $VIM: "/usr/share/nvim"

Run :checkhealth for more info

  • Gkeep: [output of :checkhealth gkeep]

gkeep: health#gkeep#check

gkeep

  • OK: gkeepapi 0.13.7 installed
  • OK: keyring installed
  • WARNING: Not logged in but auth token exists
    • ADVICE:
      • Try :GkeepOpen
  • INFO: Syncing notes to /home/bhanu/work/notes
  • INFO: Log file: /home/bhanu/.cache/nvim/gkeep.log

Additional context
Add any other context about the problem here.

Screenshots
If applicable, add screenshots to help explain your problem.

Unknown error logging in; please report an issue on github. API error: ('BadAuthentication', None)

Reported on behalf of @srbhp. Copied into new issue from #3.

Describe the bug
I get this error

Unknown error logging in; please report an issue on github. API error: ('BadAuthentication', None)

But this Python script worked for me

import gkeepapi

keep = gkeepapi.Keep()
success = keep.login('[email protected]', 'APP-Passward')
print("######    TO DO             ################################")
gnotes = keep.all()
for ig in gnotes:
    if ig.pinned:
        print(ig.title)
        print(ig.text)
print("############################################################")

:checkhealth gkeep
Gives me

## Python 3 provider (optional)
  - INFO: Using: g:python3_host_prog = "/usr/bin/python3.9"
  - INFO: Executable: /usr/bin/python3.9
  - INFO: Python version: 3.9.6
  - INFO: pynvim version: 0.4.3
  - OK: Latest pynvim is installed.

I suspect gkeep.nvim somehow picks up an older version of python.
How do I debug it ?

Can't login

Describe the bug
When executing Gkeeplogin and entering credentials, I'm redirected to the browser and see "one moment please..." forever.
checking the url I see this "auth_display_name=Android+Login+Service&source=Android+Login" but I'm using a macbook, not sure if this is expected.

To Reproduce
Steps to reproduce the behavior:

  • install,
    :UpdateRemotePlugins
    :Gkeeplogin
  1. Go to '...'
  2. Run command '....'
  3. See error

Expected behavior
to actually login

Version information

  • OS: macos catalina
  • Neovim: NVIM v0.6.0
  • Gkeep: [output of :checkhealth gkeep]
## gkeep                                                                                                                                                     
  - OK: gkeepapi 0.13.7 installed                                                                                                                            
  - OK: keyring installed                                                                                                                                    
  - WARNING: Not logged in                                                                                                                                   
    - ADVICE:                                                                                                                                                
      - Try :GkeepLogin       

Additional context
Add any other context about the problem here.

Screenshots
If applicable, add screenshots to help explain your problem.

GkeepLogin error

Describe the bug

This seems very similar to #4 but has a slightly different stack trace and also cause - so opening a new issue.

I am unable to logon as :GkeepLogin [email protected] throws this stack trace. Keyring appears to be working alright.

Error detected while processing function remote#define#CommandBootstrap[5]..remote#define#request:
line    2:
Error invoking '/home/unop/.local/share/nvim/site/pack/gkeep/start/gkeep.nvim/rplugin/python3/gkeep:command:GkeepLogin' on channel 3 (python3-rplugin-host):
error caught in request handler '/home/unop/.local/share/nvim/site/pack/gkeep/start/gkeep.nvim/rplugin/python3/gkeep:command:GkeepLogin [['[email protected]']]':
Traceback (most recent call last):
  File "/home/unop/.local/share/nvim/site/pack/gkeep/start/gkeep.nvim/rplugin/python3/gkeep/plugin.py", line 81, in w
    f(self, *args, **kwargs)
  File "/home/unop/.local/share/nvim/site/pack/gkeep/start/gkeep.nvim/rplugin/python3/gkeep/plugin.py", line 47, in d
    return f(self, *args[0])
  File "/home/unop/.local/share/nvim/site/pack/gkeep/start/gkeep.nvim/rplugin/python3/gkeep/plugin.py", line 661, in cmd_login
    return prompt(
  File "/home/unop/.local/share/nvim/site/pack/gkeep/start/gkeep.nvim/rplugin/python3/gkeep/modal/prompt.py", line 42, in show
    bufnr = self._create_buffer()
  File "/home/unop/.local/share/nvim/site/pack/gkeep/start/gkeep.nvim/rplugin/python3/gkeep/modal/prompt.py", line 17, in _create_buffer
    bufnr.options["buftype"] = "prompt"
  File "/usr/lib/python3/dist-packages/pynvim/api/common.py", line 116, in __setitem__
    self._set(key, value)
  File "/usr/lib/python3/dist-packages/pynvim/api/common.py", line 58, in request
    return self._session.request(name, self, *args, **kwargs)
  File "/usr/lib/python3/dist-packages/pynvim/api/nvim.py", line 182, in request
    res = self._session.request(name, *args, **kwargs)
  File "/usr/lib/python3/dist-packages/pynvim/msgpack_rpc/session.py", line 104, in request
    raise self.error_wrapper(err)
pynvim.api.common.NvimError: E474: Invalid argument

A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'nvim'
  2. Run command ':GkeepLogin [email protected]'
  3. See error above

Expected behavior
I believe I should be prompted for password/API keys next but I am unable to progress pass this first step.

Version information

  • OS:

Running a debian minimal VM inside parallels on a Mac.

$ uname -a
Linux freya 5.10.0-16-arm64 #1 SMP Debian 5.10.127-1 (2022-06-30) aarch64 GNU/Linux

$ cat /etc/os-release 
PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
NAME="Debian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
  • Neovim:
NVIM v0.4.4
Build type: Release
Lua 5.1
Compilation: /usr/bin/cc -g -O2 -fdebug-prefix-map=/build/neovim-AMNr6D/neovim-0.4.4=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=1 -DDISABLE_LOG -Wdate-time -D_FORTIFY_SOURCE=1 -O2 -DNDEBUG -DMIN_LOG_LEVEL=3 -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=always -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -I/build/neovim-AMNr6D/neovim-0.4.4/build/config -I/build/neovim-AMNr6D/neovim-0.4.4/src -I/usr/include -I/usr/include/lua5.1 -I/build/neovim-AMNr6D/neovim-0.4.4/build/src/nvim/auto -I/build/neovim-AMNr6D/neovim-0.4.4/build/include
Compiled by [email protected]

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

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/share/nvim"

Run :checkhealth for more info
  • Gkeep:
health#gkeep#check
========================================================================
## gkeep
  - OK: gkeepapi 0.14.2 installed
  - OK: gpsoauth 1.0.2 installed
  - OK: keyring installed
  - WARNING: Not logged in
    - ADVICE:
      - Try :GkeepLogin
  - INFO: Log file: /home/unop/.cache/nvim/gkeep.log

Additional context

This is a fresh install of neovim installed from the debian repos via sudo apt install neovim

pip install keyrings.alt in place. Without this :checkhealth gkeep complains about

  - ERROR: Error with keyring provider: No recommended backend was available. Install a recommended 3rd party backend package; or, install the keyrings.alt package if you want to use   the non-recommended backends. See https://pypi.org/project/keyring for details.

All vim directories have been moved out of the way i.e. mv ~/.vim ~/.vim.bak; mv ~/.vimrc ~/.vimrc.bak.

It seems the keyring may be working as expected.. or at least the test suggested in #4 doesn't throw any errors.

$ python3 -c 'import keyring; a=keyring.get_password("google-keep-token", "foobar"); print(a)'
None
$ cat ~/.cache/nvim/gkeep.json 
{"email": "[email protected]", "saved_searches": []}

Screenshots
If applicable, add screenshots to help explain your problem.

Login error.

gkeep health check

/n/gkeep.log [Scratch] X
1 1 gkeep: health#gkeep#check 2 ===================================== =================================== 3 ## gkeep 4 - OK: gkeepapi 0.14.2 installed
5 - OK: gpsoauth 1.0.2 installed
6 - OK: keyring installed
7 - WARNING: Not logged in 8 - ADVICE: 9 - Try :GkeepLogin 10 - INFO: Syncing notes to /root/. gnotes 11 - INFO: Log file: /root/.cache/ nvim/gkeep.log

I set debug on the loggin and it mentioned this

DEBUG 2023-04-23 11:08:07,826 [gkeep. plugin] Ignoring method _on_buf_enter . State State.Uninitialized not allowed

Now I am using Neovim in termux Debian
Linux localhost 6.2.1-PRoot-Distro #1 SMP PREEMPT Thu Feb 23 16:23:33 CST 2023 aarch64 aarch64 aarch64 GNU/Linux

Python version
Python 3.10.6 (main, Mar 10 2023, 10:55:28) [GCC 11.3.0] on linux

Does not cleanly uninstall -- Please help --

Describe the bug
Received very annoying error messages after uninstalling gkeep.nvim. Ensured any mention of gkeep was not present in either my configuration files, nor in the plugin directory. Finally tracked down the error to the rplugin.nvim file located in ~/.local/share/nvim/rplugin.nvim. Where plenty of mentioning was present.

To Reproduce
Steps to reproduce the behavior:

  1. I assume this problem is related to how the plugin interacts with lazy.
  2. Install Lazy.nvim
  3. A gkeep to configuration files for lazy.nvim to install.
  4. Install required python package for plugin.
  5. Have lazy install gkeep plugin.
  6. Now try to remove it by:
  7. Remove gkeep.nvim from configuration files.
  8. Have lazy clean gkeep from the system.
  9. Error should appear now.

Expected behavior
It would be nice if my experience is confirmed, and somehow the removal of these additional configuration lines successfully resolved.

Version information

  • OS: OpenBSD
  • Neovim: 0.9.2
  • Gkeep: N/A

Received errors

Error detected while processing BufEnter Autocommands for "*"..function remote#define#AutocmdBootstrap[7]..BufEnter Autocommands for "*"..function remote#define#request:                                                                                                         
line    2:                                                                                                                                                                                                                                                                        
Error invoking '/home/user/.local/share/nvim/lazy/gkeep.nvim/rplugin/python3/gkeep:autocmd:BufEnter:*' on channel 4 (python3-rplugin-host):                                                                                                                                  
no request handler registered for "/home/user/.local/share/nvim/lazy/gkeep.nvim/rplugin/python3/gkeep:autocmd:BufEnter:*" 
Error executing vim.schedule lua callback: ....local/share/nvim/lazy/lazy.nvim/lua/lazy/view/float.lua:207: BufEnter Autocommands for "*"..function remote#define#request, line 2: Vim(let):Error invoking '/home/user/.local/share/nvim/lazy/gkeep.nvim/rplugin/python3/gkee
p:autocmd:BufEnter:*' on channel 4 (python3-rplugin-host):                                                                                                                                                                                                                        
no request handler registered for "/home/user/.local/share/nvim/lazy/gkeep.nvim/rplugin/python3/gkeep:autocmd:BufEnter:*"                                                                                                                                                    
stack traceback:                                                                                                                                                                                                                                                                  
        [C]: in function 'nvim_win_close'                                                                                                                                                                                                                                         
        ....local/share/nvim/lazy/lazy.nvim/lua/lazy/view/float.lua:207: in function <....local/share/nvim/lazy/lazy.nvim/lua/lazy/view/float.lua:205>

Contents of rplugin.nvim

call remote#host#RegisterPlugin('python3', '/home/user/.local/share/nvim/lazy/gkeep.nvim/rplugin/python3/gkeep', [
      \ {'sync': v:true, 'name': '_gkeep_complete_enter', 'type': 'function', 'opts': {}},
      \ {'sync': v:true, 'name': '_gkeep_complete_new', 'type': 'function', 'opts': {}},
      \ {'sync': v:true, 'name': '_gkeep_complete_position', 'type': 'function', 'opts': {}},
      \ {'sync': v:true, 'name': 'BufReadCmd', 'type': 'autocmd', 'opts': {'pattern': 'gkeep://*', 'eval': 'expand("<amatch>")'}},
      \ {'sync': v:true, 'name': '_gkeep_sync_file', 'type': 'function', 'opts': {}},
      \ {'sync': v:true, 'name': 'BufEnter', 'type': 'autocmd', 'opts': {'pattern': '*', 'eval': 'expand("<abuf>")'}},
      \ {'sync': v:true, 'name': '_gkeep_buf_write_pre', 'type': 'function', 'opts': {}},
      \ {'sync': v:true, 'name': 'BufWriteCmd', 'type': 'autocmd', 'opts': {'pattern': 'gkeep://*', 'eval': 'expand("<abuf>")'}},
      \ {'sync': v:true, 'name': '_gkeep_set_note_type', 'type': 'function', 'opts': {}},
      \ {'sync': v:true, 'name': '_gkeep_prompt_close', 'type': 'function', 'opts': {}},
      \ {'sync': v:true, 'name': 'GkeepBrowse', 'type': 'command', 'opts': {}},
      \ {'sync': v:true, 'name': 'GkeepCheck', 'type': 'command', 'opts': {}},
      \ {'sync': v:true, 'name': 'GkeepClearChecked', 'type': 'command', 'opts': {}},
      \ {'sync': v:true, 'name': 'GkeepClose', 'type': 'command', 'opts': {}},
      \ {'sync': v:true, 'name': 'GkeepEnter', 'type': 'command', 'opts': {'complete': 'customlist,_gkeep_complete_enter', 'nargs': '*'}},
      \ {'sync': v:true, 'name': 'GkeepGoto', 'type': 'command', 'opts': {}},
      \ {'sync': v:true, 'name': 'GkeepLogin', 'type': 'command', 'opts': {'nargs': '*'}},
      \ {'sync': v:true, 'name': 'GkeepLogout', 'type': 'command', 'opts': {}},
      \ {'sync': v:true, 'name': 'GkeepNew', 'type': 'command', 'opts': {'complete': 'customlist,_gkeep_complete_new', 'nargs': '*'}},
      \ {'sync': v:true, 'name': 'GkeepOpen', 'type': 'command', 'opts': {'complete': 'customlist,_gkeep_complete_position', 'nargs': '?'}},
      \ {'sync': v:true, 'name': 'GkeepPopup', 'type': 'command', 'opts': {}},
      \ {'sync': v:true, 'name': 'GkeepRefresh', 'type': 'command', 'opts': {}},
      \ {'sync': v:true, 'name': 'GkeepSortChecked', 'type': 'command', 'opts': {}},
      \ {'sync': v:true, 'name': 'GkeepSync', 'type': 'command', 'opts': {}},
      \ {'sync': v:true, 'name': 'GkeepToggle', 'type': 'command', 'opts': {'complete': 'customlist,_gkeep_complete_position', 'nargs': '?'}},
      \ {'sync': v:true, 'name': 'GkeepUpdateLinks', 'type': 'command', 'opts': {}},
      \ {'sync': v:true, 'name': 'GkeepYank', 'type': 'command', 'opts': {}},
      \ {'sync': v:true, 'name': '_gkeep_dispatch', 'type': 'function', 'opts': {}},
      \ {'sync': v:true, 'name': 'GkeepStatus', 'type': 'function', 'opts': {}},
      \ {'sync': v:true, 'name': '_gkeep_all_notes', 'type': 'function', 'opts': {}},
      \ {'sync': v:true, 'name': '_gkeep_health', 'type': 'function', 'opts': {}},
      \ {'sync': v:true, 'name': '_gkeep_list_action', 'type': 'function', 'opts': {}},
      \ {'sync': v:true, 'name': '_gkeep_menu_action', 'type': 'function', 'opts': {}},
      \ {'sync': v:true, 'name': '_gkeep_modal', 'type': 'function', 'opts': {}},
      \ {'sync': v:true, 'name': '_gkeep_omnifunc', 'type': 'function', 'opts': {}},
      \ {'sync': v:true, 'name': '_gkeep_popup_action', 'type': 'function', 'opts': {}},
      \ {'sync': v:false, 'name': '_gkeep_preload', 'type': 'function', 'opts': {}},
      \ {'sync': v:false, 'name': '_gkeep_preload_if_any_open', 'type': 'function', 'opts': {}},
      \ {'sync': v:true, 'name': '_gkeep_render_note', 'type': 'function', 'opts': {}},
      \ {'sync': v:true, 'name': '_gkeep_search', 'type': 'function', 'opts': {}},
     \ ])

Note text is getting duplicated

Describe the bug
Every once in a while the note that I'm editing duplicates all its text.
Everything from the id: field and below gets appended to the note. It's not a
big deal because I can just delete everything below the second id: field, but
it shouldn't be happening

To Reproduce
I do not have a reliable repro yet. If anyone else can get one or has ideas,
please comment on this issue.

Version information

  • OS: Linux
  • Neovim:
NVIM v0.6.0
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3
Compilation: /usr/bin/gcc-11 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DNVIM_TS_HAS_SET_MATCH_LIMIT -O2 -g -Og -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=always -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -DMIN_LOG_LEVEL=3 -I/home/runner/work/neovim/neovim/build/config -I/home/runner/work/neovim/neovim/src -I/home/runner/work/neovim/neovim/.deps/usr/include -I/usr/include -I/home/runner/work/neovim/neovim/build/src/nvim/auto -I/home/runner/work/neovim/neovim/build/include
Compiled by runner@fv-az65-618

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

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "
/home/runner/work/neovim/neovim/build/nvim.AppDir/usr/share/nvim"

Run :checkhealth for more info
  • Gkeep: [output of :checkhealth gkeep]
gkeep: health#gkeep#check
========================================================================
## gkeep
  - OK: gkeepapi 0.13.6 installed
  - OK: keyring installed
  - OK: Logged in as arc********@gmail.com
  - OK: Neorg support enabled
  - INFO: Log file: /home/stevearc/.cache/nvim/gkeep.log

Failed to login: Failed to create the collection: Prompt dismissed..

Describe the bug
Failed to login
Error log last line is: 'keyring.errors.InitError: Failed to create the collection: Prompt dismissed..'

To Reproduce
Steps to reproduce the behavior:
1.Install plugin and execute :UpdateRemotePlugins
2. run :GkeepLogin
3.See error:

line    2:
Error invoking '/home/hungz/.local/share/nvim/site/pack/packer/start/gkeep.nvim/rplugin/python3/gkeep:function
:_gkeep_prompt_close' on channel 3 (python3-rplugin-host):
error caught in request handler '/home/hungz/.local/share/nvim/site/pack/packer/start/gkeep.nvim/rplugin/pytho
n3/gkeep:function:_gkeep_prompt_close [['hungzucced']]':
Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/secretstorage/util.py", line 46, in send_and_get_reply
    return self._connection.send_and_get_reply(msg, unwrap=True)
  File "/usr/lib/python3.10/site-packages/jeepney/io/blocking.py", line 190, in send_and_get_reply
    return unwrap_msg(msg_in)
  File "/usr/lib/python3.10/site-packages/jeepney/wrappers.py", line 214, in unwrap_msg
    raise DBusErrorResponse(msg)
jeepney.wrappers.DBusErrorResponse: [org.freedesktop.DBus.Error.UnknownMethod] ('Object does not exist at path
 “/org/freedesktop/secrets/collection/login”',)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/usr/lib/python3.10/site-packages/secretstorage/collection.py", line 161, in get_default_collection
    return Collection(connection)
  File "/usr/lib/python3.10/site-packages/secretstorage/collection.py", line 44, in __init__
    self._collection.get_property('Label')
  File "/usr/lib/python3.10/site-packages/secretstorage/util.py", line 64, in get_property
    (signature, value), = self.send_and_get_reply(msg)
  File "/usr/lib/python3.10/site-packages/secretstorage/util.py", line 49, in send_and_get_reply
    raise ItemNotFoundException('Item does not exist!') from resp
secretstorage.exceptions.ItemNotFoundException: Item does not exist!

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/keyring/backends/SecretService.py", line 61, in get_preferred_collec
tion
    collection = secretstorage.get_default_collection(bus)
  File "/usr/lib/python3.10/site-packages/secretstorage/collection.py", line 163, in get_default_collection
    return create_collection(connection, 'Default',
File "/usr/lib/python3.10/site-packages/secretstorage/collection.py", line 145, in create_collection
    raise PromptDismissedException('Prompt dismissed.')
secretstorage.exceptions.PromptDismissedException: Prompt dismissed.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/hungz/.local/share/nvim/site/pack/packer/start/gkeep.nvim/rplugin/python3/gkeep/plugin.py", line
 46, in d
    return f(self, *args[0])
  File "/home/hungz/.local/share/nvim/site/pack/packer/start/gkeep.nvim/rplugin/python3/gkeep/plugin.py", line
 80, in w
    f(self, *args, **kwargs)
  File "/home/hungz/.local/share/nvim/site/pack/packer/start/gkeep.nvim/rplugin/python3/gkeep/plugin.py", line
 361, in close_prompt
    self._modal.prompt.close(text)
  File "/home/hungz/.local/share/nvim/site/pack/packer/start/gkeep.nvim/rplugin/python3/gkeep/modal/prompt.py"
, line 66, in close
callback(text)
  File "/home/hungz/.local/share/nvim/site/pack/packer/start/gkeep.nvim/rplugin/python3/gkeep/plugin.py", line
 80, in w
    f(self, *args, **kwargs)
  File "/home/hungz/.local/share/nvim/site/pack/packer/start/gkeep.nvim/rplugin/python3/gkeep/plugin.py", line
 47, in d
    return f(self, *args)
  File "/home/hungz/.local/share/nvim/site/pack/packer/start/gkeep.nvim/rplugin/python3/gkeep/plugin.py", line
 621, in cmd_login
    token = keyring.get_password("google-keep-token", email)
  File "/usr/lib/python3.10/site-packages/keyring/core.py", line 55, in get_password
    return get_keyring().get_password(service_name, username)
  File "/usr/lib/python3.10/site-packages/keyring/backends/chainer.py", line 51, in get_password
    password = keyring.get_password(service, username)
  File "/usr/lib/python3.10/site-packages/keyring/backends/SecretService.py", line 78, in get_password
    collection = self.get_preferred_collection()
  File "/usr/lib/python3.10/site-packages/keyring/backends/SecretService.py", line 63, in get_preferred_collec
tion
    raise InitError("Failed to create the collection: %s." % e)

keyring.errors.InitError: Failed to create the collection: Prompt dismissed..

Expected behavior
Login success

Version information

  • OS: Arch Linux
  • Neovim:
Build type: Release
LuaJIT 2.0.5
Compiled by builduser
  • Gkeep: [output of :checkhealth gkeep]
gkeep: health#gkeep#check                            
   8 ========================================================================
 ## gkeep                                             
    - OK: gkeepapi 0.13.7 installed                    
    - OK: keyring installed                            
    - WARNING: Not logged in                           
      - ADVICE:                                        
        - Try :GkeepLogin                              
    - ERROR: Error with keyring provider: Failed to create the collection: Prompt dismissed..
    - INFO: Log file: /home/hungz/.cache/nvim/gkeep.log           

Additional context
Add any other context about the problem here.

Screenshots
If applicable, add screenshots to help explain your problem.

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.