core
Core functionality.
local core = require "core"
active_view
(field) active_view: any
background_threads
(field) background_threads: integer
blink_start
(field) blink_start: unknown
blink_timer
(field) blink_timer: unknown
clip_rect_stack
(field) clip_rect_stack: table
co_max_time
(field) co_max_time: number
The maximum time coroutines have to run on a per frame iteration basis. This value is automatically updated on each core.step().
collect_garbage
(field) collect_garbage: boolean
command_view
(field) command_view: core.commandview
cursor_change_req
(field) cursor_change_req: any
cursor_clipboard
(field) cursor_clipboard: table
cursor_clipboard_whole_line
(field) cursor_clipboard_whole_line: table
docs
(field) docs: table
fps
(field) fps: number
The actual maximum frames per second that can be rendered.
frame_start
(field) frame_start: integer|unknown
init_working_dir
(field) init_working_dir: unknown
last_active_view
(field) last_active_view: any
log_items
(field) log_items: table
nag_view
(field) nag_view: core.nagview
next_active_view
(field) next_active_view: any
prev_window_mode
(field) prev_window_mode: any
previous_find
(field) previous_find: table
previous_replace
(field) previous_replace: table
projects
(field) projects: table
quit_request
(field) quit_request: boolean
recent_projects
(field) recent_projects: table
redraw
(field) redraw: boolean
restart_request
(field) restart_request: boolean
root_view
(field) root_view: core.rootview
We load core views before plugins that may need them.
status_view
(field) status_view: core.statusview
A status bar implementation, check core.status_view.
threads
(field) threads: table
title_view
(field) title_view: core.titleview
updating_scale
(field) updating_scale: boolean
visited_files
(field) visited_files: table
window
(field) window: unknown
window_mode
(field) window_mode: any
window_size
(field) window_size: table
window_title
(field) window_title: string
core.ignore_file_rule
A pre-processed config.ignore_files entry.
match_dir
(field) match_dir: boolean
Match directories only.
pattern
(field) pattern: string
A lua pattern.
use_path
(field) use_path: boolean
Match a full path including path separators, otherwise match filename only.
add_background_thread
function core.add_background_thread(f: any, weak_ref: any, ...any)
-> unknown
add_project
function core.add_project(project: any)
-> unknown
add_thread
function core.add_thread(f: any, weak_ref: any, ...any)
-> unknown
blink_reset
function core.blink_reset()
compose_window_title
function core.compose_window_title(title: any)
-> string
configure_borderless_window
function core.configure_borderless_window()
confirm_close_docs
function core.confirm_close_docs(docs: any, close_fn: any, ...any)
current_project
function core.current_project(filename?: string)
-> project: (core.project)?
2. is_open: boolean
3. belongs: boolean
Get project for currently opened DocView or given filename path. If the given path does not belongs to any of the opened projects a new project object will be created and returned using the directory of the given filename path.
@return project
@return is_open
— The returned project is open
@return belongs
— The file belongs to the returned project
custom_log
function core.custom_log(level: any, show: any, backtrace: any, fmt: any, ...any)
-> table
delete_temp_files
function core.delete_temp_files(dir: any)
deprecation_log
function core.deprecation_log(kind: string)
Show deprecation notice once per kind
.
error
function core.error(...any)
-> table
exit
function core.exit(quit_fn: any, force: any)
get_ignore_file_rules
function core.get_ignore_file_rules()
-> core.ignore_file_rule[]
Gets a list of pre-processed config.ignore_files patterns for usage in combination of common.match_ignore_rule()
get_log
function core.get_log(i: any)
-> string
get_views_referencing_doc
function core.get_views_referencing_doc(doc: any)
-> table
init
function core.init()
load_plugins
function core.load_plugins()
-> boolean
2. table
load_project_module
function core.load_project_module()
-> boolean
2. unknown|nil
load_user_directory
function core.load_user_directory()
-> boolean
2. unknown
log
function core.log(...any)
-> table
log_quiet
function core.log_quiet(...any)
-> table
normalize_to_project_dir
function core.normalize_to_project_dir(path: any)
on_error
function core.on_error(err: any)
on_event
function core.on_event(type: any, ...any)
-> boolean
open_doc
function core.open_doc(filename: any)
-> unknown
open_project
function core.open_project(project: any)
pop_clip_rect
function core.pop_clip_rect()
project_absolute_path
function core.project_absolute_path(path: any)
push_clip_rect
function core.push_clip_rect(x: any, y: any, w: any, h: any)
quit
function core.quit(force: any)
reload_module
function core.reload_module(name: any)
remove_project
function core.remove_project(project: any, force: any)
-> boolean|unknown
request_cursor
function core.request_cursor(value: any)
restart
function core.restart()
root_project
function core.root_project()
-> unknown
legacy interface
run
function core.run()
set_active_view
function core.set_active_view(view: any)
set_project
function core.set_project(project: any)
-> unknown
set_visited
function core.set_visited(filename: any)
show_title_bar
function core.show_title_bar(show: any)
step
function core.step()
-> boolean
temp_filename
function core.temp_filename(ext: any, dir: any)
-> unknown
try
function core.try(fn: any, ...any)
-> boolean
2. unknown
warn
function core.warn(...any)
-> table
write_init_project_module
function core.write_init_project_module(init_filename: any)