internal

package
v0.1.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 28, 2024 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ConfigFiles = map[string]string{
	"makefile": "Makefile",
	"rakefile": "Rakefile",
	"gemfile":  "Gemfile",

	".gitignore":  ".gitignore",
	".gitmodules": ".gitmodules",
	".gitconfig":  ".gitconfig",

	"dockerfile":         "Dockerfile",
	"docker-compose.yml": "Docker Compose file",

	"package.json":  "package.json",
	"yarn.lock":     "yarn.lock",
	"tsconfig.json": "tsconfig.json",

	"go.mod": "go.mod",
	"go.sum": "go.sum",
}

Config files, map as file name -> file label. These files are commonly used in programming projects.

View Source
var IsDebugEnabled = false

Debug mode

View Source
var SupportedLanguages = map[string]*LanguageDefinition{
	".s":   newLangDef("Assembly", []string{"//"}, [][]string{{"/*", "*/"}}),
	".S":   newLangDef("Assembly", []string{"//"}, [][]string{{"/*", "*/"}}),
	".c":   newLangDef("C", []string{"//"}, [][]string{{"/*", "*/"}}),
	".h":   newLangDef("C Header", []string{"//"}, [][]string{{"/*", "*/"}}),
	".hh":  newLangDef("C++ Header", []string{"//"}, [][]string{{"/*", "*/"}}),
	".hpp": newLangDef("C++ Header", []string{"//"}, [][]string{{"/*", "*/"}}),
	".cpp": newLangDef("C++", []string{"//"}, [][]string{{"/*", "*/"}}),
	".cs":  newLangDef("C#", []string{"//"}, [][]string{{"/*", "*/"}}),
	".rs":  newLangDef("Rust", []string{"//"}, [][]string{{"/*", "*/"}}),
	".lua": newLangDef("Lua", []string{"--"}, [][]string{{"--[[", "]]"}}),

	".js":  newLangDef("JavaScript", []string{"//"}, [][]string{{"/*", "*/"}}),
	".mjs": newLangDef("JavaScript", []string{"//"}, [][]string{{"/*", "*/"}}),
	".cjs": newLangDef("JavaScript", []string{"//"}, [][]string{{"/*", "*/"}}),
	".jsx": newLangDef("JavaScript", []string{"//"}, [][]string{{"/*", "*/"}}),

	".ts":  newLangDef("TypeScript", []string{"//"}, [][]string{{"/*", "*/"}}),
	".mts": newLangDef("TypeScript", []string{"//"}, [][]string{{"/*", "*/"}}),
	".cts": newLangDef("TypeScript", []string{"//"}, [][]string{{"/*", "*/"}}),
	".tsx": newLangDef("TypeScript", []string{"//"}, [][]string{{"/*", "*/"}}),

	".java":  newLangDef("Java", []string{"//"}, [][]string{{"/*", "*/"}}),
	".php":   newLangDef("PHP", []string{"//"}, [][]string{{"/*", "*/"}}),
	".py":    newLangDef("Python", []string{"#"}, [][]string{{"\"\"\"", "\"\"\""}}),
	".pl":    newLangDef("Perl", []string{"#"}, [][]string{{":=", ":=cut"}}),
	".rb":    newLangDef("Ruby", []string{"#"}, [][]string{{":=begin", ":=end"}}),
	".swift": newLangDef("Swift", []string{"//"}, [][]string{{"/*", "*/"}}),
	".go":    newLangDef("Go", []string{"//"}, [][]string{{"/*", "*/"}}),
	".kt":    newLangDef("Kotlin", []string{"//"}, [][]string{{"/*", "*/"}}),
	".scala": newLangDef("Scala", []string{"//"}, [][]string{{"/*", "*/"}}),
	".r":     newLangDef("R", []string{"#"}, [][]string{{"/*", "*/"}}),

	".sh":   newLangDef("Shell", []string{"#"}, [][]string{{"", ""}}),
	".zsh":  newLangDef("Shell", []string{"#"}, [][]string{{"", ""}}),
	".bash": newLangDef("Shell", []string{"#"}, [][]string{{"", ""}}),

	".html": newLangDef("HTML", []string{"<!--", "//"}, [][]string{{"<!--", "-->"}}),
	".xml":  newLangDef("XML", []string{"<!--"}, [][]string{{"<!--", "-->"}}),
	".css":  newLangDef("CSS", []string{"//"}, [][]string{{"/*", "*/"}}),

	".json": newLangDef("JSON", []string{}, [][]string{{"", ""}}),
	".yaml": newLangDef("YAML", []string{"#"}, [][]string{{"", ""}}),
	".toml": newLangDef("TOML", []string{"#"}, [][]string{{"", ""}}),

	".md":  newLangDef("Markdown", []string{}, [][]string{{"", ""}}),
	".txt": newLangDef("Plain Text", []string{}, [][]string{{"", ""}}),
}

Supported programming languages, map as file extension -> language name.

Functions

This section is empty.

Types

type LanguageDefinition

type LanguageDefinition struct {
	Name          string     `json:"name"`
	LineComments  []string   `json:"line_comment"`
	BlockComments [][]string `json:"block_comment"`
}

LanguageDefinition represents a programming language definition.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL