Fix file permissions
This commit is contained in:
@@ -1,54 +0,0 @@
|
||||
#ifndef EDITOR_COMPLETIONS_H
|
||||
#define EDITOR_COMPLETIONS_H
|
||||
|
||||
#include "pch.h"
|
||||
#include "ui/completionbox.h"
|
||||
#include "ui/hover.h"
|
||||
#include "utils/utils.h"
|
||||
|
||||
struct CompletionItem {
|
||||
std::string label;
|
||||
uint8_t kind;
|
||||
std::optional<std::string> detail;
|
||||
std::optional<std::string> documentation;
|
||||
bool is_markup = false;
|
||||
bool deprecated = false;
|
||||
bool asis = true;
|
||||
std::string sort;
|
||||
std::string filter;
|
||||
bool snippet = false;
|
||||
std::vector<TextEdit> edits;
|
||||
json original;
|
||||
std::vector<char> end_chars;
|
||||
};
|
||||
|
||||
struct CompletionSession {
|
||||
struct Editor *editor;
|
||||
std::shared_mutex mtx;
|
||||
bool active = false;
|
||||
Coord hook;
|
||||
std::optional<std::string> prefix;
|
||||
uint32_t select = 0;
|
||||
uint32_t scroll = 0;
|
||||
std::vector<CompletionItem> items;
|
||||
std::vector<uint32_t> visible;
|
||||
bool complete = true;
|
||||
std::optional<char> trigger_char;
|
||||
uint8_t trigger = 0;
|
||||
CompletionBox box;
|
||||
HoverBox hover;
|
||||
uint32_t doc = UINT32_MAX;
|
||||
std::atomic<bool> hover_dirty = false;
|
||||
int version;
|
||||
|
||||
CompletionSession(Editor *editor) : editor(editor), box(this) {}
|
||||
|
||||
void resolve_doc();
|
||||
void accept();
|
||||
void next();
|
||||
void prev();
|
||||
void choose(uint8_t index);
|
||||
void handle(KeyEvent event);
|
||||
};
|
||||
|
||||
#endif
|
||||
Executable → Regular
Executable → Regular
+5
@@ -1,6 +1,7 @@
|
||||
#ifndef EDITOR_H
|
||||
#define EDITOR_H
|
||||
|
||||
#include "editor/decl.h"
|
||||
#include "editor/hooks.h"
|
||||
#include "editor/indents.h"
|
||||
#include "editor/visual.h"
|
||||
@@ -101,6 +102,10 @@ struct Editor : Window {
|
||||
void lsp_handle(json msg);
|
||||
void apply_lsp_edits(std::vector<TextEdit> edits, bool move);
|
||||
|
||||
// Not used by core editor, but can be used by
|
||||
// extentions (due to cursor movement complexity)
|
||||
void format_full(int version);
|
||||
|
||||
Coord move_left(Coord cursor, uint32_t number);
|
||||
Coord move_right(Coord cursor, uint32_t number);
|
||||
|
||||
|
||||
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Reference in New Issue
Block a user