aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2023-08-09 15:33:53 -0700
committerGitHub <noreply@github.com>2023-08-09 15:33:53 -0700
commit1d81d7a268f5805bedc077f80582a89afe1bfe84 (patch)
tree484f64f146f6eca0655fc11cf4d72b0d3733d108
parente6947bb1e80aa61ec43446f43dcc7c8a022f5b78 (diff)
downloadrneovim-1d81d7a268f5805bedc077f80582a89afe1bfe84.tar.gz
rneovim-1d81d7a268f5805bedc077f80582a89afe1bfe84.tar.bz2
rneovim-1d81d7a268f5805bedc077f80582a89afe1bfe84.zip
feat(defaults): treat "•" as a list item prefix #24623
Problem: Nvim docs use "•" as a list item prefix but `gw{motion}` doesn't format such lists by default. Solution: Change the 'comments' option to include "fb:•" by default.
-rw-r--r--runtime/doc/news.txt1
-rw-r--r--runtime/doc/options.txt2
-rw-r--r--runtime/doc/vim_diff.txt1
-rw-r--r--runtime/lua/vim/_meta/options.lua2
-rw-r--r--src/nvim/options.lua2
5 files changed, 5 insertions, 3 deletions
diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt
index d0da35fb90..713569e1ad 100644
--- a/runtime/doc/news.txt
+++ b/runtime/doc/news.txt
@@ -151,6 +151,7 @@ The following changes to existing APIs or features add new behavior.
option, which allows for rendering e.g., diagnostic severities differently.
• Defaults:
+ • 'comments' includes "fb:•".
• 'shortmess' includes the "C" flag.
• Automatic linting of treesitter query files (see |ft-query-plugin|).
Can be disabled via: >lua
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index fca73ddd1e..f04fb2fb51 100644
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -1374,7 +1374,7 @@ A jump table for the options with a short description can be found at |Q_op|.
< Minimum value is 12, maximum value is 10000.
*'comments'* *'com'* *E524* *E525*
-'comments' 'com' string (default "s1:/*,mb:*,ex:*/,://,b:#,:%,:XCOMM,n:>,fb:-")
+'comments' 'com' string (default "s1:/*,mb:*,ex:*/,://,b:#,:%,:XCOMM,n:>,fb:-,fb:•")
local to buffer
A comma-separated list of strings that can start a comment line. See
|format-comments|. See |option-backslash| about using backslashes to
diff --git a/runtime/doc/vim_diff.txt b/runtime/doc/vim_diff.txt
index f9926bfb53..15bb13d5a9 100644
--- a/runtime/doc/vim_diff.txt
+++ b/runtime/doc/vim_diff.txt
@@ -37,6 +37,7 @@ Defaults *nvim-defaults*
- 'backspace' defaults to "indent,eol,start"
- 'backupdir' defaults to .,~/.local/state/nvim/backup// (|xdg|), auto-created
- 'belloff' defaults to "all"
+- 'comments' includes "fb:•"
- 'commentstring' defaults to ""
- 'compatible' is always disabled
- 'complete' excludes "i"
diff --git a/runtime/lua/vim/_meta/options.lua b/runtime/lua/vim/_meta/options.lua
index 94e26742e6..8edb87df91 100644
--- a/runtime/lua/vim/_meta/options.lua
+++ b/runtime/lua/vim/_meta/options.lua
@@ -956,7 +956,7 @@ vim.go.co = vim.go.columns
--- insert a space.
---
--- @type string
-vim.o.comments = "s1:/*,mb:*,ex:*/,://,b:#,:%,:XCOMM,n:>,fb:-"
+vim.o.comments = "s1:/*,mb:*,ex:*/,://,b:#,:%,:XCOMM,n:>,fb:-,fb:•"
vim.o.com = vim.o.comments
vim.bo.comments = vim.o.comments
vim.bo.com = vim.bo.comments
diff --git a/src/nvim/options.lua b/src/nvim/options.lua
index ec6481c520..a565329eac 100644
--- a/src/nvim/options.lua
+++ b/src/nvim/options.lua
@@ -1287,7 +1287,7 @@ return {
abbreviation = 'com',
alloced = true,
cb = 'did_set_comments',
- defaults = { if_true = 's1:/*,mb:*,ex:*/,://,b:#,:%,:XCOMM,n:>,fb:-' },
+ defaults = { if_true = 's1:/*,mb:*,ex:*/,://,b:#,:%,:XCOMM,n:>,fb:-,fb:•' },
deny_duplicates = true,
desc = [=[
A comma-separated list of strings that can start a comment line. See