mirror of
https://github.com/kahole/edamagit.git
synced 2024-10-26 09:00:54 +03:00
rename magit-status language to magit
This commit is contained in:
parent
0bd845e2d8
commit
6938f21bff
@ -20,10 +20,6 @@
|
||||
Dog forskjellig update, e.g magit Log state
|
||||
Finn ut av multiplexingen her
|
||||
|
||||
Da tror jeg modellen som den er nå er grei.
|
||||
Hadde vært amazing om jeg klarer alt med 1 og samme language også
|
||||
altså kun "magit"... ikke "magit-status" etc
|
||||
|
||||
## UI
|
||||
- icons
|
||||
https://code.visualstudio.com/api/references/icons-in-labels
|
||||
|
46
package.json
46
package.json
@ -60,41 +60,41 @@
|
||||
"commandPalette": [
|
||||
{
|
||||
"command": "extension.magit-branching",
|
||||
"when": "editorLangId == magit-status"
|
||||
"when": "editorLangId == magit"
|
||||
},
|
||||
{
|
||||
"command": "extension.magit-visit-at-point",
|
||||
"when": "editorLangId == magit-status"
|
||||
"when": "editorLangId == magit"
|
||||
},
|
||||
{
|
||||
"command": "extension.magit-stage",
|
||||
"when": "editorLangId == magit-status"
|
||||
"when": "editorLangId == magit"
|
||||
},
|
||||
{
|
||||
"command": "extension.magit-stage-all",
|
||||
"when": "editorLangId == magit-status"
|
||||
"when": "editorLangId == magit"
|
||||
},
|
||||
{
|
||||
"command": "extension.magit-unstage",
|
||||
"when": "editorLangId == magit-status"
|
||||
"when": "editorLangId == magit"
|
||||
},
|
||||
{
|
||||
"command": "extension.magit-unstage-all",
|
||||
"when": "editorLangId == magit-status"
|
||||
"when": "editorLangId == magit"
|
||||
},
|
||||
{
|
||||
"command": "extension.magit-commit",
|
||||
"when": "editorLangId == magit-status"
|
||||
"when": "editorLangId == magit"
|
||||
},
|
||||
{
|
||||
"command": "extension.magit-pushing",
|
||||
"when": "editorLangId == magit-status"
|
||||
"when": "editorLangId == magit"
|
||||
}
|
||||
]
|
||||
},
|
||||
"languages": [
|
||||
{
|
||||
"id": "magit-status",
|
||||
"id": "magit",
|
||||
"aliases": [
|
||||
"Magit"
|
||||
],
|
||||
@ -105,72 +105,72 @@
|
||||
}
|
||||
],
|
||||
"configurationDefaults": {
|
||||
"[magit-status]": {
|
||||
"[magit]": {
|
||||
"editor.lineNumbers": "off"
|
||||
}
|
||||
},
|
||||
"grammars": [
|
||||
{
|
||||
"language": "magit-status",
|
||||
"language": "magit",
|
||||
"scopeName": "source.magit",
|
||||
"path": "./syntaxes/magitStatus.tmGrammar.json"
|
||||
"path": "./syntaxes/magit.tmGrammar.json"
|
||||
}
|
||||
],
|
||||
"keybindings": [
|
||||
{
|
||||
"command": "editor.toggleFold",
|
||||
"key": "tab",
|
||||
"when": "editorTextFocus && editorLangId == magit-status"
|
||||
"when": "editorTextFocus && editorLangId == magit"
|
||||
},
|
||||
{
|
||||
"command": "extension.magit",
|
||||
"key": "g",
|
||||
"when": "editorTextFocus && editorLangId == magit-status"
|
||||
"when": "editorTextFocus && editorLangId == magit"
|
||||
},
|
||||
{
|
||||
"command": "extension.magit-visit-at-point",
|
||||
"key": "enter",
|
||||
"when": "editorTextFocus && editorLangId == magit-status"
|
||||
"when": "editorTextFocus && editorLangId == magit"
|
||||
},
|
||||
{
|
||||
"command": "extension.magit-commit",
|
||||
"key": "c",
|
||||
"when": "editorTextFocus && editorLangId == magit-status"
|
||||
"when": "editorTextFocus && editorLangId == magit"
|
||||
},
|
||||
{
|
||||
"command": "extension.magit-branching",
|
||||
"key": "b",
|
||||
"when": "editorTextFocus && editorLangId == magit-status"
|
||||
"when": "editorTextFocus && editorLangId == magit"
|
||||
},
|
||||
{
|
||||
"command": "extension.magit-pushing",
|
||||
"key": "shift+p",
|
||||
"when": "editorTextFocus && editorLangId == magit-status"
|
||||
"when": "editorTextFocus && editorLangId == magit"
|
||||
},
|
||||
{
|
||||
"command": "extension.magit-help",
|
||||
"key": "?",
|
||||
"when": "editorTextFocus && editorLangId == magit-status"
|
||||
"when": "editorTextFocus && editorLangId == magit"
|
||||
},
|
||||
{
|
||||
"command": "extension.magit-stage",
|
||||
"key": "s",
|
||||
"when": "editorTextFocus && editorLangId == magit-status"
|
||||
"when": "editorTextFocus && editorLangId == magit"
|
||||
},
|
||||
{
|
||||
"command": "extension.magit-stage-all",
|
||||
"key": "shift+s",
|
||||
"when": "editorTextFocus && editorLangId == magit-status"
|
||||
"when": "editorTextFocus && editorLangId == magit"
|
||||
},
|
||||
{
|
||||
"command": "extension.magit-unstage",
|
||||
"key": "u",
|
||||
"when": "editorTextFocus && editorLangId == magit-status"
|
||||
"when": "editorTextFocus && editorLangId == magit"
|
||||
},
|
||||
{
|
||||
"command": "extension.magit-unstage-all",
|
||||
"key": "shift+u",
|
||||
"when": "editorTextFocus && editorLangId == magit-status"
|
||||
"when": "editorTextFocus && editorLangId == magit"
|
||||
},
|
||||
{
|
||||
"command": "extension.magit-save-and-close-commit-msg",
|
||||
|
@ -20,7 +20,7 @@ export default class ContentProvider implements vscode.TextDocumentContentProvid
|
||||
constructor() {
|
||||
|
||||
// TODO:
|
||||
// Might not need to delete all views. Keep magit-status view?
|
||||
// Might not need to delete all views. Keep magit view?
|
||||
// and then just update
|
||||
// might wanna delete other types of views though
|
||||
|
||||
@ -37,7 +37,6 @@ export default class ContentProvider implements vscode.TextDocumentContentProvid
|
||||
|
||||
provideTextDocumentContent(uri: vscode.Uri): string | Thenable<string> {
|
||||
|
||||
console.log("provide text content call");
|
||||
// already loaded?
|
||||
// let document = this._documents.get(uri.toString());
|
||||
// if (document) {
|
||||
@ -67,7 +66,17 @@ export default class ContentProvider implements vscode.TextDocumentContentProvid
|
||||
// }
|
||||
}
|
||||
|
||||
let seq = 0;
|
||||
// TODO:
|
||||
// - Creation of new views shouldnt be done from this class
|
||||
// - Only getting views from view stock based on uri.
|
||||
// - Uri generation should probably happen in the view class itself
|
||||
// or somewhere else
|
||||
// - This way to perfect multiplexing
|
||||
// Updating:
|
||||
// - View lifecycle management: care about existing views?
|
||||
// simpler to just replace
|
||||
// - Need to get onDidChange into the views somehow.
|
||||
// - Maybe this class should be responsible for all view creation after all.. hmm
|
||||
|
||||
export function encodeLocation(uri: string): vscode.Uri {
|
||||
const query = uri;
|
||||
|
@ -4,7 +4,7 @@ import MagitUtils from '../utils/magitUtils';
|
||||
|
||||
export default class FoldingRangeProvider implements vscode.FoldingRangeProvider {
|
||||
|
||||
static scheme = { scheme: 'magit', language: 'magit-status' };
|
||||
static scheme = { scheme: 'magit', language: 'magit' };
|
||||
|
||||
dispose() { }
|
||||
|
||||
|
@ -3,7 +3,7 @@ import MagitUtils from '../utils/magitUtils';
|
||||
|
||||
export default class HighlightProvider implements vscode.DocumentHighlightProvider {
|
||||
|
||||
static scheme = { scheme: 'magit', language: 'magit-status' };
|
||||
static scheme = { scheme: 'magit', language: 'magit' };
|
||||
|
||||
dispose() { }
|
||||
|
||||
|
@ -1,8 +1,7 @@
|
||||
import { TextView } from "../general/textView";
|
||||
import { MagitBranch } from "../../models/magitBranch";
|
||||
|
||||
// https://emacs.stackexchange.com/questions/26247/meaning-of-magit-status-buffer-head-merge-push
|
||||
|
||||
// https://emacs.stackexchange.com/questions/26247/meaning-of-magit- status-buffer-head-merge-push
|
||||
|
||||
// https://magit.vc/manual/magit/The-Two-Remotes.html
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user