Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
eval: 'expand("")',
})
onTextChanged(args) {
this.flyParse(args);
}
@Autocmd('BufEnter', {
pattern: '*.js,*.jsx',
eval: 'expand("")',
})
async onBufEnter() {
const filename = await this.nvim.buffer.name;
console.log(`[${filename.split('/').pop()}] Handle buffer enter`);
this.parse({ filename, clear: true });
}
@Autocmd('InsertLeave', {
pattern: '*.js,*.jsx',
eval: 'expand("")',
})
onInsertLeave(filename) {
this.parse({ filename, clear: true });
}
highlight(buffer, id, name, lineStart, columnStart, columnEnd, isDebug) {
// Save highlighting group for console.logging
if (isDebug) {
_.range(columnEnd - columnStart + 1).forEach((num) => {
const key = `${lineStart + 1},${columnStart + num}`; // [lineStart, columnStart + num];
if (!DEBUG_MAP.has(key)) {
DEBUG_MAP.set(key, []);
}
const groups = DEBUG_MAP.get(key);
console.log('Error with highlight debug, position doesnt exist');
}
} else {
this.nvim.command('echomsg "[tigris] console.log mode not enabled: `let g:tigris#console.log=1` to enable"');
}
}
@Autocmd('TextChangedI', {
pattern: '*.js,*.jsx',
eval: 'expand("")',
})
onTextChangedI(args) {
this.flyParse(args);
}
@Autocmd('TextChanged', {
pattern: '*.js,*.jsx',
eval: 'expand("")',
})
onTextChanged(args) {
this.flyParse(args);
}
@Autocmd('BufEnter', {
pattern: '*.js,*.jsx',
eval: 'expand("")',
})
async onBufEnter() {
const filename = await this.nvim.buffer.name;
console.log(`[${filename.split('/').pop()}] Handle buffer enter`);
this.parse({ filename, clear: true });
}
@Autocmd('TextChangedI', {
pattern: '*.js,*.jsx',
eval: 'expand("")',
})
onTextChangedI(args) {
this.flyParse(args);
}
@Autocmd('TextChanged', {
pattern: '*.js,*.jsx',
eval: 'expand("")',
})
onTextChanged(args) {
this.flyParse(args);
}
@Autocmd('BufEnter', {
pattern: '*.js,*.jsx',
eval: 'expand("")',
})
async onBufEnter() {
const filename = await this.nvim.buffer.name;
console.log(`[${filename.split('/').pop()}] Handle buffer enter`);
this.parse({ filename, clear: true });
}
@Autocmd('InsertLeave', {
pattern: '*.js,*.jsx',
eval: 'expand("")',
})
onInsertLeave(filename) {
this.parse({ filename, clear: true });
}
const group = DEBUG_MAP.get(key);
this.nvim.command(
`echomsg "[tigris] position: ${key} - Highlight groups: ${[group.join(', ')]}"`
);
} else {
this.nvim.command(
'echomsg "[tigris] Error, position doesn\'t exist"'
);
console.log('Error with highlight debug, position doesnt exist');
}
} else {
this.nvim.command('echomsg "[tigris] console.log mode not enabled: `let g:tigris#console.log=1` to enable"');
}
}
@Autocmd('TextChangedI', {
pattern: '*.js,*.jsx',
eval: 'expand("")',
})
onTextChangedI(args) {
this.flyParse(args);
}
@Autocmd('TextChanged', {
pattern: '*.js,*.jsx',
eval: 'expand("")',
})
onTextChanged(args) {
this.flyParse(args);
}
@Autocmd('BufEnter', {
pattern: '*.js,*.jsx',