Luigit
repositories / dotfiles

dotfiles

bugabingas dorkfiles

owned by admin

neovim/lua/std/commentstring.lua

Raw
local commentstring = {
	-- harvested from nvim 0.12 vim.filetype.get_option while ftplugin was still on.
	-- these are the authoritative builtin values. edit freely.
	bash = "# %s",
	c = "// %s",
	clojure = "; %s",
	cmake = "# %s",
	conf = "# %s",
	cpp = "// %s",
	css = "/* %s */",
	dart = "// %s",
	desktop = "# %s",
	dockerfile = "# %s",
	elixir = "# %s",
	erlang = "% %s",
	fish = "# %s",
	gdscript = "# %s",
	gitcommit = "# %s",
	gitconfig = "; %s",
	gleam = "// %s",
	go = "// %s",
	graphql = "# %s",
	hcl = "# %s",
	html = "<!-- %s -->",
	java = "// %s",
	javascript = "// %s",
	javascriptreact = "// %s",
	jsonc = "// %s",
	julia = "# %s",
	just = "# %s",
	kotlin = "// %s",
	lisp = "; %s",
	lua = "-- %s",
	make = "# %s",
	markdown = "<!-- %s -->",
	nim = "# %s",
	nu = "# %s",
	ocaml = "(* %s *)",
	odin = "// %s",
	perl = "# %s",
	php = "/* %s */",
	proto = "// %s",
	python = "# %s",
	qml = "// %s",
	r = "# %s",
	roc = "# %s",
	ruby = "# %s",
	rust = "// %s",
	scala = "// %s",
	scheme = "; %s",
	scss = "// %s",
	sh = "# %s",
	sql = "-- %s",
	swift = "// %s",
	systemd = "; %s",
	terraform = "# %s",
	tex = "% %s",
	tmux = "# %s",
	toml = "# %s",
	typescript = "// %s",
	typescriptreact = "// %s",
	v = "// %s",
	vim = '"%s',
	xml = "<!-- %s -->",
	yaml = "# %s",
	zig = "// %s",

	-- nvim had no builtin commentstring for these. added by hand.
	haskell = "-- %s",
	ini = "; %s",
	bibtex = "% %s",

	-- your custom filetypes ( from options/filetypes.lua ). VERIFY these.
	d2 = "# %s",
	vfp = "* %s", -- Visual FoxPro line comment
	gotmpl = "{{/* %s */}}",
	opentofu = "# %s",
	quadlet = "# %s",
	shtml = "<!-- %s -->",
	superhtml = "<!-- %s -->",
}

return commentstring