chentoast / marks.nvim

A better user experience for viewing and interacting with Vim marks.
MIT License
848 stars 43 forks source link

`setup()` with no param causes "config is nil" error #67

Closed aj3423 closed 2 years ago

aj3423 commented 2 years ago

When setup with require('marks').setup(), it shows error: image

setup({}) fixes the problem, maybe could be better:

-- marks.nvim/lua/init.lua:191
function M.setup(config)
  config = config or {}  -- <----
--...
  M.mark_state.builtin_marks = config.builtin_marks or {}  <-- this causes error 

Just an advice, please close this anyway, thanks for the plugin.

chentoast commented 2 years ago

Should be an easy fix.