Commit Graph

52 Commits

Author SHA1 Message Date
Akin 0b4007fb5a
Feature/fix buffer opening closing (#2644)
* add a quickOpen default mode command and set to edit and fix check against zero in getDefaultOpenMode

* fix typo in comment

* further typo fixes in comment
2018-11-02 09:39:09 +00:00
Akin ff1a064f45
Feature/Add vue textmate grammar (#2582)
* add language grammar for vue

* add vue syntax path to default config
2018-10-04 00:18:10 +01:00
Akin 8cdc82c86f
switch reason ml textmate grammar to sane reasonml grammar (#2579) 2018-09-26 17:10:27 +01:00
Akin e6595e6283
Feature/add bookmarks menu (#2554)
* add bookmarks menu plugin to traverse a users marked folders

* finalise plugin import only necessary things
make registering a command bound to the class

* add space to beginning of comment

* load and install quick open by adding it to package
use native bookmarks implementation

* remove duplicated bookmarks menu

* set is Dir to public in bookmarks

* add error handling of invalid file paths add comments for future todos

* fix comment typo

* add command to watch quick open extension for dev

* if path is absolute use absolute path otherwise derive path from bse dir or homedir
2018-09-10 11:54:19 +01:00
Akin 5238600911
Feature/change token format (#1705)
* add check to return string for classname construction
if only passed single word
also add more token types for reasonml

* add more default tokens

* add css types and increase token colors

* add vscode style token colors for onedark
add functionality to parse the token colors format

* switch oni token style to match vscode

* remove convoluted ternary in flattenTheme

* tweak get key from token color to match updated token style

* import deepmerge avoid type issues via require.default

* fix bad merge in common.ts

* comment out console.log

* fix lint errors

* merge default and theme tokens

* add types for deepmerge and ts-ignore the incorrect package

* fix package json reversions

* remove deepmerge create custom strategy for merging tokens

* fix lint errors

* update tests and fix object.entries (not available in test)

* fix scope fetching in syntax reconciler and make variables more readable

* fix atomic calls length check in synchronizeTokenColors

* Stop inclusion of banned tokens in the syntax highlight reconciler

* rank token scopes by priority and depth

* separate out tokenRanking into a tokenSelector class -> single responsibility principle

* refactor getMatchingToken to use recursive method

* add break clause to function

* fix lint errors

* change test to use foeground instead of foregroundColor

* fix incorrect set fontStyle in vim highlights for italics
prettify comments into jsDoc blocks

* fix comment for TokenScorer

* add initial test for token theme provider
be explicit about passing in the token colors and default to the service

* fix passing in of the token colors as props explicitly
this makes the component (TokenThemeProvider) more testable

* refactor construct className following testing
add passing jest-styled-components test

* refactor constructClassname further to be more fault tolerant
update jest and use test.each for classname testing

* fix failing test re. checking fontsyle for bold and italic

* further tweak to create Classname to further simplify its workings
make get Css Rule should actually return a css rule and not occasionally a boolean

* fix type annotations for getCssRule and ensure str always returned

* add tokenScorer tests and improve copy for themeprovider tests
2018-09-09 22:51:04 +01:00
Matthew McLennan 98d129ecb1 Feature/added csharp textmate grammar (#2539)
* Added textmate grammar for csharp

* changed csharp extension folder structure to match other languages
2018-09-01 19:37:44 +01:00
Ryan C b901ecdda0
Markdown Syntax Highlights (#2332)
* Basic code highlights.

* Check if the given language is valid, use auto highlight if not.

* Fix check.

* Set baseUrl as well.

Unrelated to code blocks, but fixes #1653 and is a single line change in the options I've added.

* Bump marked types package number.

* Move style sheet to only markdown preview.

* Swap theme to option.

* Fix review comment from previous PR.

* Fix nohighlights.

* Update tests for Markdown preview.

* Fix lint error.

* Add config option for syntax highlights.
2018-07-26 10:45:08 +01:00
Tal Amuyal c66787474c
Move API out (#2459)
Thanks, @Akin909 :)
2018-07-25 22:59:57 +03:00
Tal Amuyal f47506103b
Add a 'find in files' quick-menu (#2315)
* Pull out QuickOpen to a plugin
* Add a 'find in files' option
2018-07-20 05:55:41 +03:00
Alexander Elias 0572848007 added dracula theme (#2408)
* added dracula theme

* updated background color, updated to newest vim colors
2018-07-12 08:53:20 -07:00
Akin 3c054763a8
Feature/use local prettier (#2360)
* pull upstream

* add initial attempt to load local prettier not global

* prioritise local prettier over global

* add local dependencies dont rely on global ones

* remove unnecessary fallback arg as fn already returns a fallback

* prettier
2018-06-30 18:23:39 +01:00
Colby DeHart 1462bf7463 added elixir syntaxes (#2325) 2018-06-28 07:33:16 +01:00
Ryan C 7c09bcf76c
Markdown changes (#2282)
* Fix a few small Markdown preview issues.

* Close markdown preview on exit.

* Update marked version.

* Add config option for auto scroll.

* Keep focus on initial split.

* Fix toggle function.

Before the fix was only applied to close.

* Hook up clicking a link to open the Oni browser if activated.

Fixes #2021.

* Fix lint error.

* Update for changed API.

* Update tests.

* Bump package number.

* Update lock file.

* Syntax change.
2018-06-19 17:15:10 +01:00
parkerault c23e28e1aa Add Hybrid and Gruvbox themes (#2088)
Add a port of the Hybrid theme: https://github.com/w0ng/vim-hybrid

...and also Gruvbox: https://github.com/morhetz/gruvbox
2018-04-15 12:27:14 -07:00
Bryan Phelps dd7e656fd1
Specify optional 'baseVimBackground' for themes (#2083)
* Update solarized theme

* Fix background color for solarized

* Fix lint issues

* Add test

* Fix bug when setting colorscheme, where the colorscheme would not always be reported correctly

* Remove file accidentally committed
2018-04-15 06:37:38 -07:00
Akin 471244d57f
Feature/add several language grammars (#2068)
* add text mate grammar paths to config

* fix typo in php name and rename objc filetypes and extensions

* add python, sh, zsh

* actually add the files

* Fix incorrect dir paths for md syntaxes
2018-04-08 01:12:36 +01:00
Akin 48d55d9b74
add textmate grammar for java (#2061) 2018-04-07 17:28:23 +01:00
Akin 3d21a976ff
Feature: Prettier plugin (#1540)
* Add initial implementation of prettier plugin

* add config options to test using config functionality

* update config to allow disabling, add status icon

* comment out console.log add check if code is formatted
add initial attempt at cursor position

* fix config to camelcase

* add assets for prettier icon

* add line column and [wip] attempt to return correct cursor pos

* fix cursor positioning

* Remove linecolumn, not working remove prettier asset
more work on cursor positioning
add success and error status icons

* update yarn lock

* Fix eslintrc add allowedFiletypes checking

* add onClick fn to prettier element

add allowedFiletypes option to config

* remove console.logs

* add convert offset function and get cursor offset function

* use vim based byte offset or prettier

* remove unused dependencies

* add install command or prettier plugin

* add install command to plugins command

* update dir or prettier plugin

* relocate prettier plugin to correct dir

* add filepath for parser inference and change icon

* remove extra CR added on joining string

* add printWidth option and add graphql to default fts

* fix print width use number

* add editor config option add
buffer state to track if modified add icon colors

* remove console.log

* conditionally render prettier status item

* minor change to rerun tests

* [WIP] Add prettier-plugin test

* [WIP] comment out test while attempting to test prettier plugin\

* comment out non-functional tests

* re-add commented tests, deactivate prettier test

* Tweak prettier plugin architecture for tests

* comment out ci tests and contiue work on prettier test

* fix config for test, update test [WIP]

* add functioning ci test for prettier

* ensure existence of prettier status item

* add helper functions to common
add new [wip] ci test

* refactor get cursor offset to a get method
make convertCursorPos zero base to march getCursorPos

* add new bufferCursorTest file

* fix missing CI test and remove redundant calc

* remove redundant methods from prettier test

* tweak function to keep state within function rather than globally
move failing windows test to bottom to see if only that test fails

* remove specific use of newline per platform

* switch to a more functional approach
slightly excessive for now but a foundation
for further tweaks in the ongoing development
of this plugin

* fix prettier callback to use new state tracking version
switch to function keyword to ensure applyprettier is hoisted
so callback can reference it

* fix typo and add check in prettier rc function

* use prettier info to poplulate compatible filetypes

* fix incorrect ref to config

* actually remove incorrect conffig ref
2018-04-06 07:44:57 +01:00
Akin 670848715c
Enhancement(small)/ update title bar background color for one-dark (#1858) 2018-03-20 17:02:59 +00:00
Bryan Phelps 3f2fe46de6
Automation: Quit neovim prior to ending automation (#1815)
* Hook up automation to quit all neovim instances prior to exiting

* Change timing of calling quit

* Close all tabs

* More tweaks from quitting

* Add commit

* Fix lint issues

* Remove quitting editors for now

* Fix up quit logic

* Progress fixing issues

* Suppress request / notify when session is disposed

* improvements

* Handle null editor case

* Add robustness around Neovim lifecycle

* Fix lint issues

* Fix prettier issue

* Fix app initialization

* Fix lint issues
2018-03-16 16:06:12 -07:00
Bryan Phelps 435faf567c
Snippets: Bug fix - placeholder ordering (#1722)
* Fix placeholder ordering

* Get tests green

* Remove unnecessary image

* Fix lint issues
2018-03-06 19:43:21 -08:00
Bryan Phelps 51f7d0cafd
Snippets - Add reason snippets (#1668)
* Add snippets for reason

* Fix path in reason package.json

* Add README.md documenting source of syntax / snippets
2018-02-28 15:04:43 -08:00
Bryan Phelps a7e475cf40
Image Layers (#1619)
* Plumb through filetype

* Get image layer working end-to-end

* Fix lint issues

* Add images extension

* Fix remainig issues with image layer
2018-02-27 19:14:08 -08:00
Bryan Phelps 157340f0eb
Snippets - add HTML snippets (#1650)
* Add html snippets

* Fix bug in snippet buffer layer if the screen coordinates aren't available yet
2018-02-27 11:35:02 -08:00
Bryan Phelps ecbf972c11
Snippets: Add out-of-box javascript snippets (#1649)
* Add javascript snippets

* Fix package json
2018-02-27 09:03:00 -08:00
Bryan Phelps 3637269967
Snippets - Bug Fix: Fix ordering of placeholders (#1615)
* Add red test

* Add second red test for wrapping

* Snippet session

* Exercise ordering with import

* Update SnippetSession
2018-02-23 12:31:17 -08:00
Bryan Phelps a9933362d0
#55 - Part 4: Wire up snippets provided by extensions (#1608)
* Start working on tabstop / synchronization

* Synchronize changes in buffer across placeholders

* Some initial unit tests

* Add test for synchronizing placeholders

* Add no-invalid-template-strings

* Add snippet session

* Add typescript snippets file

* Add snippet parser + completion provider for snippets

* Fix circular dependency

* Hook up snippet completion provider

* Hook up plugin loader

* Fix loading of snippets

* Fix lint issues
2018-02-23 07:57:43 -08:00
Akin b3b5b8025c
Feature/syntax highlight hover (#1443)
* create syntax hl fn WIP

* reduce size of QF containers

* [WIP] initial progress rendering highlights

* get highlights from vim pass these to theme object

* actually add token generator

* re-add main files ........

* fix weird deletion of files

* remove errant console.log

* remove highlighting from docs
switch to string replacement method

* add functionality to specify token in config and themes

* deepmerge config files rather than shallow

* add mergeWith to ensure user theme populated
use token names to generate classes

* re-add code block renderer

* add tslint console disable whilst debugging

* fix lint errors

* add more scopes and associated classes

* fix rendering of hover text YAY!!
split out quickInfo container and pass it its own version of the theme

* add new components file

* refactor IToken structure as per discussions with @bryphe

* remove dead code now new update fn implemented

* convert scopes back to arrays and implement scope population

* fix syntax highlighting reconciliation

* create fn to automate class generation

* add more scopes and falsy check in renderwithclasses fn

* fix syntax highlighting reconciliation
again by omitting newly added vim highlights on search

* add codeblock style and update regexp

* add idea for generating all default token colors

* convert away from using fallback
generate default vim colors on init

* move and tidy up fns

* Add TokenColors service

* Plumb through token colors as dependency

* Fix up issue where the token color event wasn't firing

* Fix lint issues

* tweak highlighting fix rendering bugs

* Plumb token colors through the rest of the way

* Put in a placeholder for converting token style

* Resolve colors to hex

* Start stubbing out a test case for TokenColorsTests

* Update to use real colors

* Update test interfaces, get tests green

* remove console.log

* modularise render prop out tidy up markdown parser

* move styling into render prop so its passed down

* add theme provider to vcs

* rename token generator - probably consolidate in tokencolors

* Fix typing

* Factor MockThemeLoader to separate file

* Bring in bold/italic from nvim_get_hl_by_name

* Remove TODO

* tweak styles and symbols and comments

* rename token generator file aim to consolidate this

* remove split by new lines fn

* switchh to lodash merge and remove ramda

* add semi for markdown config...

* Start refactoring to handle synchronizing token colors

* Hook up synchronization of token colors

* Scope VimHighlights down to the original configuration values

* Stub out tests

* Start stubbing out a mock neovim instance interface for testing requests

* Add simple test cases for NeovimTokenColorSynchronizer

* Fix bold/italic handling

* Fix lint issue

* Return a map of tokens, lines and rules stack
from the token generator
use the line associated with the generated
token to match the line marked passes in

* add more scopes to provider

* ensure arrays are properly merged in provider creating tokens

* hide quick hover if no content, remove ramda types

* add few more tokens
this will be a theme

* add strings to defaults

* fix comment typo remove changes to onedark.json

* add check for null match in hover renderer

* add unit tests for markdown functions and tweak md
to work better based on testing

* remove console.logs

* reduce cursor positioner width FIX word boundary error!!!!!

* add new test [WIP]

* Uncomment test for token generator

* [WIP] add token generator test

* add comment for the convert markdown function

* remove max-width from documentation component - not necessary

* remove test as its value is questionable and
it requires setting up moving json files around
as grammar loader is a dependecy and cant be
used without a valid textmate json file
can look into adding this functionality separately
to test grammar loader

* add spurious change to rerun tests

* re-add code block highlighting

* fix mistakenly placed css

* once again move css as Again missed the target

* Slightly increase timeout
This is because hover rendering now involves
slightly more processing and without it
it appearance is noticeably janky looking

* trim white space if code block to correctly match
remove unadvisable display table css rule

* remove unnecessary newline char

* update yarn lock

* remove code tag as marked provides one
also remove styling as this is actually unnecessary

* Add more tokens to default tokens, improve comments

* revert removal of white-space: pre for code blocks
lack of rule causes weird at a glance issue with larger
code blocks

* fix broken unit test

* Don't use sets as they remove duplicate entries
this is not ideal as hover then has missing keys
plus some functionality can be achieved without sets

* fix up comment

* use dom purify instead of markeds purifier
marked dumps html into the out put which is less
preferable and its sanitizer option breaks highlighting

* fix type annotation - since tss forced me to :(((((

* remove codespan renderer for now
2018-02-22 06:41:18 +00:00
Bryan Phelps 3d75520073
Code coverage: Switch from coveralls to codecov (#1533)
* Use codecov

* Update code coverage badge

* Fix upload command

* Try removing lcov and using json visualizer

* Try using libraries to generate the lcov file

* Update reports

* Fix up scripts

* Tweak coverage results

* Add definition for sudo-prompt

* Tweaks

* Hook up remap command

* Upload lcov

* Revert changes to Platform.ts

* Temporarily remove tests to get quicker feedback on coverage

* Temporarily remove packing step to get quicker feedback on ccov

* Fix script error

* Remove invalid coverage file

* Fix up codecov yaml

* Revert unnecessary changes

* Revert commented out code

* Some cleanup

* Bring back CiTests
2018-02-12 14:48:02 -08:00
Tal Amuyal fec88f1186 Add tests for Markdown preview plugin (#1415)
* Add tests for Markdown preview plugin

* Implement plugin API

* Implement mock API for oni-plugin-markdown-preview

* Implement actual tests

* Add custom conf that enables the markdown-preview plugin for testing

* Code Review changes
2018-02-09 15:23:00 -08:00
Bryan Phelps 4b53c06821
Refactoring: Move embedded browser from 'extension' -> 'core' (#1492)
* Move browser back to core

* Fix syntax issues in conversion
2018-02-09 11:57:36 -08:00
Bryan Phelps 75b37fcb52
Refactoring: Migrate window management state to redux store (#1449)
* Start sketching out window store

* Hook up window split component to store

* Remove unused WindowState file

* Wire up primary split again

* Get windows rendering again

* Set splitId

* Set up editor to grab focus by default, due to timing issue with the redux store implementation

* Get navigation working with parity to functionality today

* Fix lint issues

* Update markdown preview to use new window API

* Bring in latest oni-api

* Merge with focus fix
2018-02-07 18:59:54 -08:00
Bryan Phelps 4fe51a3022
Revert nord's mode colors, in favor of the previous colors (#1399) 2018-01-30 12:33:10 -08:00
Bryan Phelps bc86337e50
Run prettier over markdown / json files (#1395) 2018-01-29 19:56:24 -08:00
Bryan Phelps a4f81102ce
Prettier: Additional formatting fixes (#1366)
* Run prettier on missed files - .less, extensions, and vim plugins

* Use common tslint.json for typescript

* Fix tslint suppression
2018-01-25 21:34:40 -08:00
Bryan Phelps fa0067854f
Browser: Basic commands (#1290)
* Make back/forward items clickable

* Start stubbing out go back command

* Add default bindings for browser commands

* Fix compilation errors

* Add oni-layer-browser to linting, and fix lint issues
2018-01-23 16:32:41 -08:00
Bryan Phelps 0da6a86b10
Small change to bump up brightness of cursor in nord (#1311) 2018-01-19 10:33:25 -08:00
Bryan Phelps f830a0edc1
Feature - Browser: Add experimental configuration and stub out UX (#1233)
* Start creating browser layer

* Move styled-components to external module

* Fix some bugs around the layer rendering, and set up initial browser UX

* Remove extra whitespace

* Fix lint issues

* Tweak styles

* Fix lint issue in test

* Fix lint issue in oni-layer-browser
2018-01-09 10:53:49 -08:00
Bryan Phelps c32ca6c041
Dependency: Use 'oni-api' v0.0.20 (#1219)
* Bump dependency

* Fix typings

* Fix typing in oni-layer-browser

* Update typing in markdown-preview plugin

* Fix typo
2018-01-02 15:39:10 -08:00
Bryan Phelps 7a6dd355d0
Integrated Browser - 1: Add browser-layer plugin (#1214)
* Add oni-layer-browser project

* Hook up open url command

* Get working end-to-end

* Add build/lint steps
2018-01-02 11:55:21 -08:00
Tal Amuyal 59bf2aaf2f Feature: Improve initial markdown preview impl (#1181)
* Move Markdown-preview plugin to 'extensions' folder

* [Markdown preview] Theme links

* [Markdown preview] Reduce stuttering

* [Markdown preview] Fix styling and processing of code-blocks

* Fix CI issues
2017-12-22 14:41:10 -08:00
Akin 7b62f0e404 [WIP] Solarized theme (#1122)
* [WIP] add solarized theme

* add theme folder

* Add solarized [WIP]
tweak json to match solarized theme

* add further colors to palette

* remove unintentional log

* Remove old solarized.vim split out light/dark

* name of theme in solarized dark
2017-12-19 12:16:56 -08:00
Bryan Phelps b7a52e5628
Add nord theme (#1130) 2017-12-14 17:39:40 -08:00
Bryan Phelps 5f73dd1ccd
[Experimental] File Explorer (#1104)
* Stub out some window navigation, and bring in SharedNeovimInstance

* Add SharedNeovimInstance.ts

* Hook up input for sidebar

* Start factoring out shared neovim instance

* Fix compilation errors in SharedNeovimInstance

* Start implementation of MenuBinding

* Got navigation to the right started

* Implement moving back and forth between side bar

* Start styling and differentiating between focus/active

* Fix some lint issues

* Get keyboard accessibility working for sidebar

* Split out Sidebar components

* Bring in colors from theme

* Fix first round of lint issues

* Fix lint issues

* Start file explorer

* Add missed ExplorerSplit file

* Progress on explorer

* Add selector to convert tree to a linear format

* Get initial set of expanded files, hooked up to icons

* Handle overflow and render folders

* Get cycling through left dock panes working

* Start hooking up binding to the Explorer split

* Start hooking up keys and navigation for file explorer

* Add selection capability to the explorer

* Hook up file explorer to workspace manager, instead of hardcoding path

* Use normal-mode highlight color in sidebar for consistency

* Fix first round of lint issues

* Fix remaining lint issues

* Set up infrastructure for handling keybindings for file explorer

* Implement initial 'open file' action

* Set up focus state for core editor

* Add focus state to explorer

* Fix lint issues

* Fix merge conflict

* Only render spacer if there is a sidebar
2017-12-11 17:52:40 -08:00
Bryan Phelps 091aa27788
Sidebar Part 2 - Neovim Input + Theming (#1090)
* Stub out some window navigation, and bring in SharedNeovimInstance

* Add SharedNeovimInstance.ts

* Hook up input for sidebar

* Start factoring out shared neovim instance

* Fix compilation errors in SharedNeovimInstance

* Start implementation of MenuBinding

* Got navigation to the right started

* Implement moving back and forth between side bar

* Start styling and differentiating between focus/active

* Fix some lint issues

* Get keyboard accessibility working for sidebar

* Split out Sidebar components

* Bring in colors from theme

* Fix first round of lint issues

* Fix lint issues
2017-12-08 09:03:39 -08:00
Bryan Phelps f04822d7d1
File Icons: Bring in some tweaks / fixes that were missed (#1089)
* Remove vs-seti-icon-theme.json

* Fix path in icon loader

* Fix up cross-platform styling
2017-12-08 09:03:00 -08:00
Bryan Phelps 1b62f32fa5
Feature: Icon themes (+bundling the Seti UI theme) (#1087)
* Add seti icons

* Start prototyping icon provider

* Make progress on applying IconThemes

* Start creating loading loigic for icons

* Move IconThemes

* Got icons rendering

* Add logic to get icon class for file

* Align tab items

* Add a subtle entrance animation

* Refactor to separate files

* Align modified circle with other elements

* Fix lint issues

* Load icon font dynamically
2017-12-07 16:12:28 -08:00
Bryan Phelps 9a02a9368c
Refactor start method to better facilitate asynchronous loading (#1085)
* Add LoadingView / isLoading

* Factor some of the browser configuration logic outside of the start method

* Move theme loading prior to starting the editor

* Add subtle animation, set background color when changing themes

* Fix lint issues

* Refactor LoadingView out to separate file; delay cursor entrance until previous animations complete

* Tweak cursor entrance animation

* Fix lint issue

* Don't gate initialization on editor startup

* Fix up some issues with initialization, especially when Neovim is not available. Clean up color scheme

* Make the entrance animation a bit less intense
2017-12-07 09:09:28 -08:00
Bryan Phelps d9694d94af
Fix #1037 - Crash in GrammarLoader + go syntax file (#1043)
* Fix crash in GrammarLoader; add go.json syntax file

* Add README.md for go

* Add default textmate file for go
2017-11-30 06:38:17 -08:00
Bryan Phelps f1247f8d45
Fix #63: Synchronize titlebar color on OSX (#1034)
* Create component + state management for window title, use frameless window on OSX

* Create connected component to store, hook up title

* Add 'title' colors and update 'onedark.json

* Only show window title on Mac

* Fix lint issues

* Derive the titlebar / background color from the theme color
2017-11-29 10:41:35 -08:00