Merge pull request #2 from DanRoscigno/enable-grammar-and-spelling

Enable grammar and spelling
This commit is contained in:
Dan Roscigno 2023-06-08 12:28:01 -04:00 committed by GitHub
commit 0d3c6c9e2b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 376 additions and 1 deletions

52
ClickHouse-specific.md Normal file
View File

@ -0,0 +1,52 @@
## Working with Marksman and multiple repos
In order to keep the docs close to the source-code at ClickHouse
most of the reference (SQL syntax, etc.) docs are in the repo
where the code is. This gives us heartburn when building the
docs with Docusaurus as the files need to be combined. In the
`.gitignore` file for the docs repo all of the dirs copied over
from the ClickHouse repo are marked to be ignored; this causes the
wonderful Marksman LSP to ignore the reference docs, and marks
any links to the reference docs invalid.
The Marksman author came up with a great workaround, as `.ignore` gets
processed after `.gitignore`, I negate the ignore in `.ignore` and
the reference docs are now eligible for linking.
```
# This is to reverse the .gitignore in the ClickHouse-docs repo, as
# the marksman LSP ignores dirs in the .gitignore when checking
# for links for markdown files. This file (.ignore) gets processed
# after .gitignore, so the negation (`!`) of the path fixes the issue
# created by copying the files into the clickhouse-docs directory
# structure
# place at root dir of the markdown project, for example:
# $GITHUB/clickhouse-docs/.ignore
!docs/en/development
!docs/en/engines
!docs/en/getting-started
!docs/en/interfaces
!docs/en/operations
!docs/en/sql-reference
docs/ru
docs/zh
docs/_clients
```
## Configuring Marksman
Maybe not needed, but I am not sure. I think that `.mdx` files
may now be considered Markdown, I should check. I don't like table of
contents to be created, so this is disabled.
```
# Place at root directory of the markdown project, for example:
# $GITHUB/clickhouse-docs/.marksman.toml
[core]
markdown.file_extensions = ["md", "mdx"]
text_sync = "full"
[code_action]
toc.enable = false # Enable/disable "Table of Contents" code action
```

View File

@ -72,6 +72,9 @@ require('lazy').setup({
-- Detect tabstop and shiftwidth automatically
'tpope/vim-sleuth',
-- Grammar checking
'vigoux/ltex-ls.nvim',
-- NOTE: This is where your plugins related to LSP can be installed.
-- The configuration is done below. Search for lspconfig to find it below.
{
@ -469,7 +472,8 @@ mason_lspconfig.setup_handlers {
-- See `:help cmp`
local cmp = require 'cmp'
local luasnip = require 'luasnip'
require('luasnip.loaders.from_vscode').lazy_load()
--require('luasnip.loaders.from_vscode').lazy_load()
--require("luasnip.loaders.from_vscode").lazy_load({ paths = { "/home/droscigno/.config/nvim/my-cool-snippets/markdown.json" } })
luasnip.config.setup {}
cmp.setup {
@ -513,6 +517,60 @@ cmp.setup {
},
}
-- I want spell checking on in markdown etc.
vim.api.nvim_create_augroup("spellcheck", { clear = true })
vim.api.nvim_create_autocmd("FileType", {
group = "spellcheck",
pattern = { "gitcommit", "markdown", "mdx" },
command = "setlocal spell",
})
-- configure ltex-ls
require 'ltex-ls'.setup {
on_attach = on_attach,
capabilities = capabilities,
use_spellfile = false,
filetypes = { "latex", "tex", "bib", "markdown", "gitcommit", "text" },
settings = {
ltex = {
enabled = { "latex", "tex", "bib", "markdown", },
language = "en",
diagnosticSeverity = "information",
sentenceCacheSize = 2000,
additionalRules = {
enablePickyRules = true,
motherTongue = "en",
},
disabledRules = {
en = { "EN_QUOTES" }
},
dictionary = (function()
-- For dictionary, search for files in the runtime to have
-- and include them as externals the format for them is
-- dict/{LANG}.txt
--
-- Also add dict/default.txt to all of them
local files = {}
for _, file in ipairs(vim.api.nvim_get_runtime_file("dict/*", true)) do
local lang = vim.fn.fnamemodify(file, ":t:r")
local fullpath = vim.fs.normalize(file, ":p")
files[lang] = { ":" .. fullpath }
end
if files.default then
for lang, _ in pairs(files) do
if lang ~= "default" then
vim.list_extend(files[lang], files.default)
end
end
files.default = nil
end
return files
end)(),
},
},
}
-- Confgiure the way that diagnostics look
local diagconfig = {
@ -538,5 +596,10 @@ local diagconfig = {
vim.diagnostic.config(diagconfig)
-- I like search results to be closer to the center
-- When searching, scroll text so that there
-- are at least 5 lines above and below result
vim.o.scrolloff = 5
-- The line beneath this is called `modeline`. See `:help modeline`
-- vim: ts=2 sts=2 sw=2 et

View File

@ -0,0 +1,19 @@
# This is to reverse the .gitignore in the ClickHouse-docs repo, as
# the marksman LSP ignores dirs in the .gitignore when checking
# for links for markdown files. This file (.ignore) gets processed
# after .gitignore, so the negation (`!`) of the path fixes the issue
# created by copying the files into the clickhouse-docs directory
# structure
# place at root dir of the markdown project, for example:
# $GITHUB/clickhouse-docs/.ignore
!docs/en/development
!docs/en/engines
!docs/en/getting-started
!docs/en/interfaces
!docs/en/operations
!docs/en/sql-reference
docs/ru
docs/zh
docs/_clients

View File

@ -0,0 +1,9 @@
# place at root dir of the markdown project, for example:
# $GITHUB/clickhouse-docs/.marksman.toml
[core]
markdown.file_extensions = ["md", "mdx"]
text_sync = "full"
[code_action]
toc.enable = false # Enable/disable "Table of Contents" code action

232
spell/en.utf-8.add Normal file
View File

@ -0,0 +1,232 @@
ClickHouse
MaterializedView
S3
ReplacingMergeTree
CollapsingMergeTree
ReplicatedReplacingMergeTree
ReplicatedAggregatingMergeTree
AggregatingMergeTree
SummingMergeTree
MergeTree
ReplicatedMergeTree
ReplicatedSummingMergeTree
ReplicatedCollapsingMergeTree
ReplicatedVersionedCollapsingMergeTree
VersionedCollapsingMergeTree
MySQL
Postgres
gRPC
PostgreSQL
SQLite
ODBC
JDBC
MongoDB
Redis
RabbitMQ
HDFS
AWS
IAM
Kerberos
LDAP
UDFs
DDL
JOINs
clickhouse
Superset
http
mdx
href
https
apache
img
dataset
ConnectionDetails
SSL
Datasets
datasource
datasets
src
png
md
pypi
OpenCelliD
SQLConsoleDetail
LaGuardia
UMTS
Scatterplot
LTE
sql
TabItem
csv
CSVWithNames
md5sum
UInt8
DateTime
UInt32
Float64
Int16
UInt64
UInt16
Enum8
ActionsMenu
serverless
deployMethod
groupId
CodeBlock
LowCardinality
parens
Enum16
STDERR
v22
lts
INSERTs
Nikonov
Kseniia
Sumarokova
Nikolay
Degterinsky
filesystem
anova
analysisOfVariance
sql
datasource
ClickHouse
Grafana
clickhouse
ZooKeeper
jsonl
clickhouse
BSON
dirs
clickhouse
clickhouse
GCS
dbt
sql
Metabase
chnodes
xyz
Sharding
sharding
SmitaRKulkarni
Milovidov
Alexey
Fuzzer
Andelic
MVCC
fsync
SELECTs
MinIO
OpenLDAP
syslog
WIP
ctrl
Schulze
Tokmakov
DefaultPartitioner
pufit
FFFFFFFHHHHHHH
Trifonov
FriendLey
JSONExtract
JSON
Kruglov
Pavel
Passos
replaceOne
replaceAll
replaceRegexpOne
replaceRegexpAll
Popov
Kolupaev
OOM
Gololobov
Raúl
Marín
loopback
Mikhaylov
subquery
ThreadPool
mutex
Kochetov
Azat
Khuzhin
Vitaly
Baranov
async
Ilya
Golshtein
flynn
KevinyhZou
Yakov
Olkhovskiy
Enum
Decimal256
IPv4
Int32
IPv6
lizhuoyu5
Dmitry
Novik
generateRandom
Int128
Hulboj
alekseygolub
Zhang
ZSTD
CRC32
alesapin
Murashkina
MikhailBurdukov
macOS
GenerateRandom
multifactor
lemmatize
lemmatization
Kubernetes
Mame
CloudFormation
ARN
ClickHouseAccess
ClickHouseAccessRole
SharedMergeTree
SMT
RMT
Cloudflare
R2
SMT's
DoS
Deduplication
SharedMergeTree's
config
Jepsen
jepsen
io
DSN
SSLMode
Int64
ZooKeeper's
ZAB
linearizable
linearizability
interserver
ACLs
Base64
lw
Hostname
nc
ro
znodes
chnode1
chnode2
chnode3
marsnet
uuid
Docusaurus
LSP
wildcard
PSC
gcloud
GCP
hostname
VPC

BIN
spell/en.utf-8.add.spl Normal file

Binary file not shown.