Nvim 的 :help
頁面,是使用 tree-sitter-vimdoc 解析器,從 原始碼 產生 的。
vim.g.editorconfig = false
let g:editorconfig = v:false
)。也可以透過將緩衝區本地變數 b:editorconfig 設定為 false
來停用每個緩衝區的 EditorConfig。false
,Nvim 會將套用的屬性儲存在其中。.editorconfig
檔案中屬性的值,以及(可選的)一個包含所有其他屬性及其值的表格(對於依賴其他屬性的屬性很有用)。該值始終是一個字串,必要時必須強制轉換。範例require('editorconfig').properties.foo = function(bufnr, val, opts)
if opts.charset and opts.charset ~= "utf-8" then
error("foo can only be set when charset is utf-8", 0)
end
vim.b[bufnr].foo = val
end
"utf-8"
、"utf-8-bom"
、"latin1"
、"utf-16be"
或 "utf-16le"
其中之一。設定 'fileencoding' 和 'bomb' 選項。"lf"
、"crlf"
或 "cr"
其中之一。這些分別對應於將 'fileformat' 設定為 "unix"、"dos" 或 "mac"。"true"
或 "false"
,以確保檔案最後一個位元組總是帶有尾隨換行符。設定 'fixendofline' 和 'endofline' 選項。.editorconfig
檔案。此屬性必須位於 .editorconfig
檔案的頂層(即它不能在 glob 區段內)。