Commit Graph

1798 Commits

Author SHA1 Message Date
Ryan C 759918d17b
Ignore Yarn from Linguist. (#2462) 2018-07-26 10:44:52 +01:00
Ryan C 0d20916735
Bump oni-neovim-binaries version. (#2461) 2018-07-26 10:09:40 +01:00
Akin 97f643eed4
remove cursor moved audit time add scroll observable to close signature help (#2454) 2018-07-26 07:20:11 +01:00
Bryan Phelps 06f476c419 Add Lennaert Meijvogel as a backer - thank you! :) 2018-07-25 18:26:42 -07:00
feltech d471144793 Fix + tidy descriptions of Explorer commands (#2460)
* In the command palette when the Explorer is selected there were two
options to create a new file.  One of them is actually the command to
create a new directory.
* So fix the incorrect name for that.
* Also harmonise the naming scheme of the other explorer actions.
2018-07-25 18:20:48 -07:00
Akin c46508294e
Feature/ Indent lines improvements (#2446)
As mentioned in #2344 buffer layers suffer from laggy rendering on scroll, on some investigation it seems the `auditTime` we use in the `shouldMeasure$` observable means that the information is not being updated in real time so scrolling quickly through a buffer causes indentlines or color highlights to appear in a *janky* fashion i.e. they are out of place.

Not sure what it was used for but I think because the information is required by ui pieces which need v. up to date data re window details we should allow things to be updated as often possible. This change greatly improves the rendering.

There are a couple of things which still cause the ui to be a bit janky:
* one is the initial buffer entering although this is arguably low priority 🤷‍♂️ - seems quite a lot happens there the first time and rendering is noticeably slower.
* folding is completely unhandled (not investigated yet)
* double line wrapping
* searching in a buffer which can change the position of the window doesn't seem to update the window positioning (any ideas @bryphe?) - i.e. searching in buffer with `?` or `/` can move the viewport towards the match(es) in this case window details passed to context don't seem to update
* initial load of a buffer similar to one
### Other additions:

* I also tweaked the indent lines to use a `bannedFiletypes` buffer as opposed to a whitelist aka as discussed with @CrossR it is now on for all filetypes except those which are blacklisted. @CrossR examples of where you would want a black list I think would be most vim plugin buffers like `peekabo` or `startify` or `nerdtree` etc. in these cases the indentlines rarely render desirably and are arguably not required.

* I render the first indent line which is the same behaviour as in `vscode` however i've added an option. `experimental.indentLines.skipFirst` which allows a user to avoid this behaviour if they would prefer
2018-07-25 23:30:38 +01:00
Tal Amuyal c66787474c
Move API out (#2459)
Thanks, @Akin909 :)
2018-07-25 22:59:57 +03:00
Akin ecbd4af16c
Feature/add git commit functionality (#2441)
As part of fleshing out the VCS this pr adds the ability to commit a file using the git sidebar.

Additions:
* Menu command toggle vcs visibility
* Recent Commits Section: commits made whilst in oni (later might be preferable to get a git log rather than commits from oni)

* Commiting: see below

![vcs_commit](https://user-images.githubusercontent.com/22454918/43024011-bd3e27ac-8c64-11e8-8d2e-944047d7ed8d.gif)
2018-07-24 16:43:41 +01:00
keforbes 4ce7b50e49 remove 'File Explorer Split' menu item (#2423) 2018-07-21 22:02:57 +01:00
Tal Amuyal 1e7fe16d3e
Refactoring twards uni-repo - part 1 (#2443) 2018-07-21 09:17:21 +03:00
Paul Roberts 4bdb4f83ed Fix for #2251 Oni does not correctly locate executables (#2440) 2018-07-20 17:00:18 -07: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
Akin 97899e1222
Feature/initial Git VCS provider (#1310)
* add git addition and deletion count

* add typing to git service

* add ideas for styling

* add error handling and checks to determine rendering

* reorder comma separator

* get gitroot utility and pass in current dit

* fix name typo for gitroot fn

* add logs for debugging

* [WIP] debug ocaml lang server

* promisify exec command
merge upstream

* add semicolon to external commandline config

* add semicolon to js file as per lint error

* write manual diffSummary function
add per file changes and option to show perfile changes

* add try catch block to prevent errors

* add further check for error points

* comment out unused fn call cast promisified type to any
add fixme comment to check back in re this typing

* add FA icons add spacer char
change rendering so elements are only created
as necessary

* change long line initialisation to explicit decls

* typos re variable names

* revert markdown changes

* revert markdown changes

* remove local changes as they make little sense
fix counting of local changes in case of future use case

* re-add git-js

* tweak use of git js

* initialise git sync then use return git obj

* remove cwd calls from git instantiation

* ongoing experimentations with git plugin

* initial re-implementation of git vcs as per #2110

* attempt promises with git and use workspace

* use simple-git to get branch

* remove console.log return empty string if no current branch

* try using require version of simple git and saving git instance

* try using chaining api rather than async/await

* add git branch menu and tidy up plugin
add get branches method and git checkout method to vcs provider

* move git into version control service and add index

* Use arrow functions in git vcs provider

* add simple git to webpack external to prevent minfication mangling

* add fetch branch commands

* invert git plugin and git provider [WIP]

* add functioning vcs manager

* separate components into separate file
remove specific  references to git

* add vcs components file

* remove errant console.log

* switch to using the registerProvider pattern

* add sidebar plugin for vcs

* tweak title styles and add modified count

* use npm/yarn-run-all for start command to avoid memory leak

* fix typing of files in vcsStore

* use oni.log to log errors or default to console

* revert changes in README.md

* add simple-git as a dependency and typescript as a dev dependency

* use run-s for unit tests

* format response from git js to match VCSProvider
return status object and render based on that

* add more events to VersionControl interface

* add enzyme tests for components, refactor additions and completions

* add enzyme test file

* tweak styles following component refactor

* tidy up deletions and insertions component

* add tests for VersionControlView component

* fix stagedfileschanged event name typo
use events to trigger getStatus in vcs pane

* encapsulate getInstance phew.. really bugged me trade accuracy for cleverness in update branch indicator

* fix use of menu api as it miss matches with the menumanager

* dont export the init function in vcsmanager

* Set error state in redux on error

* update rxjs to 5.5.10 to match oni-types package

* use fork of "oni-type" to test if ci passes

* fix overflow issues and use word-break

* wrap provider methods in try catch and explicitly return void or val

* downgrade to rxjs 5.5.8

* revert to now fixed oni-types package

* add initial functionality to activate and deactivate plugin

* [WIP] Switch to activation and deactivation exclusively through events

* remove console.log

* add check inside vcsManager to control when plugin loads WIP

* fix provider selection check

* remove extra newline

* upgrade oni types to 0.0.8

* fix manager comment typo add, ability to navigate titles
add visibility filter to view component
remove unused check in get status

* add ability to collapse and expand sections

* update tests and change from using capitalize fn :(

* Move version control components, tidy up provider activations handler
fix tests and componentize the caret

* update snapshots

* fix parsing issues in ui-test tabs

* revert changes in FileConfiguration and tsconfig react

* only create sidebar if none is existent
remove unnecessary return, revert prettier to master version

* remove useless wrapper div

* update snapshots

* allow git provider errors to bubble up so they can be handled
with notifications which inform the user of why something is not working

* remove unused var

* add vcsmanager test in jest

* fix not re-applying state error

* pull upstream

* remove uses of Log and use oni-core-logging

* merge upstream fix conflicts

* fix vcs name issue re. notifications

* remove extra variable in App.ts

* set simple git working dir constructor and handle updates there
remove explicit passing in of working dir

* remove vcs provider from duplicate interface

* update functions to remove unnecessary args

* run get diff and get branch in parallel fix missing return in diff fn

* explicitly pass in the project root to prevent race conditions
whilst changing dir

* fix removal of initial gitp assignment in constructor

* improve version control manager tests

* update jest to avoid coverage bug improve test further

* add send notification to vcs pane args

* update snapshots

* fix import ordering in view

* gst

* separate out subscription creation and error notifications
switch package json plugin commands to && chain

* remove console.logs

* rename args

* split out mocks into separate files

* update tests wip

* remove is repo check since plugin should only activate if is true
convert handle provider to async function

* await handle provider status

* remove console.log assign subscriptions directly

* upgrade ts-jest and redux mock store

* add readable names to handle provider status

* import * for vcs types fix import of redux mock store

* add vcs definition file to be deleted once oni-api adds vcs

* initialise project root to activeWorkspace

* revert changes to commont.ts use SFC typing

* fix package json

* add vcs store test

* fix new name of versioncontrolstate

* hide sidebar behind experimental feature flag

* remove collect coverage from jest config option

* update version control pane to focus on testing react not redux

* add jest to codecov command
remove unnecessary type annotations

* add jest coverage json to final istanbul report

* update jest coverage runner

* change path name for jest coverage file

* add inlineSourceMap option to jest tsconfig

* remove jest coverage merging

* add jest coverage upload command

* remove unnecessary coverage flag and type annotations

* fix chained and operator ui bug
using thing && thing && component can cause 0 to be rendered
2018-07-18 14:02:44 +01:00
Jordan 388c740aae clickable and draggable scrollbar (#2431)
* can click to navigate

This deals with #251

* added drag event

* replaced click and drag events with document node events

this allows the mouse to be moved and released off the scrollbar

* now using absolute cursor position in the window

`.offsetY` was measuring from the top of any clickable element, so in the statusbar or on the tabline, it would start measuring from a different point, causing the cursor to jump.

This now uses the absolute y position of the cursor.

* cosmetic changes: use state and class methods

* added private modifiers

* moved private method to satisfy tslint

* changed to public modifiers

* updated to use arrow functions instead of .bind methods

* removed commented out code and fixed linting
2018-07-18 11:40:24 +01:00
Akin a335ce4f2c
Feature/render indent lines at correct levels (#2433)
* pull upstream

* add a check to skip drawing indents for deepest and initial level

* add skipIndentLine
2018-07-17 08:19:43 +01:00
Akin cdd2224cc6
Bugfix/close tooltip on scroll (#2428)
* pull upstream

* add on buffer scrolled event and hide tooltips
2018-07-16 22:56:37 +01:00
Jordan cca5847070 Allow toggling of the Plugins pane in the sidebar (#2417)
#2343 added the functionality to toggle the Explorer pane in the sidebar. This adds the same functionality to the Plugins pane.

The bug mentioned in #2349 does not affect this command.
2018-07-14 07:58:53 +01:00
Bryan Phelps 4c3d29c837 Add Michal Hantl as a backer - thank you! :) 2018-07-12 08:56:44 -07:00
Bryan Phelps 0b48a38323 Add Aditya Gudimella as a backer - thank you! :) 2018-07-12 08:56:15 -07:00
Bryan Phelps 85f736c888 Add Doug Beney as a backer - thank you! :) 2018-07-12 08:55:48 -07: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
Bryan Phelps 7b5ed4f0c7
Automation: Install tests (companion to #2372) (#2378)
* Gate tests to only run on Windows

* Fix lint issues

* Hook up setup tests to run as part of 'yarn run test'

* Run setup tests on appveyor; don't run as part of 'yarn run test'

* Uncomment out test that registry key is removed, since Ryan's changes now address that!

* Fix lint issues

* Increase timeout

* Include arch for setup file path

* Include arch for setup file

* Fix up arch on appveyor

* Fix lint issues
2018-07-10 14:15:41 -07:00
Akin 75ab1b8470
Feature/Color layer (#2413)
Having had a go at implementing a layer in #2344, I've also implemented a layer to highlight css colors in certain files. The way that this works is that if a file extension is in the whitelist any hex/rgba/hsla color is colored.

<img width="635" alt="screen shot 2018-07-08 at 23 10 12" src="https://user-images.githubusercontent.com/22454918/42424495-f6cb3262-8304-11e8-95ed-9f5db93fea9e.png">


Todos:
- [x] Experimental flag and user config options for file extensions
- [x] Doesn't match the css color names aka `rebeccapurple, goldenrod` etc.
- [x] Ci Test

Outstanding Issues:
~- The layer renders on top of the renderer so the color highlight lies on top of the text obscuring the syntax highlight, currently I reduce the colors opacity but this actually changes the color so its not quite accurate
	- Potentially I could put the matching color into the element but set the `color` prop to transparent so it makes a word shaped window 😆
	- Another idea would be just to render the text inside the highlight using the user's font~

- The regex tries to fuzzy match inside a string this can lead to ?rare situations where things are incorrectly highlighted - for example html entities can contain what the regex would recognise as a hex string.

This is a tough one as its beyond my abilities with regex to not break the regex but have it fail if it matches inside another *word* I think possibly using some sort of word boundary `\\b` check might work but would rather not try and fix this right off the bat as its a potential rabbit hole.

<img width="340" alt="screen shot 2018-07-08 at 20 57 32" src="https://user-images.githubusercontent.com/22454918/42423454-614d757c-82f2-11e8-9859-f73b7842c2b2.png">

- Currently wouldn't handle wrapping at all as the logic used in #2344 is not generalised so would have to be re-implemented here
2018-07-10 08:38:56 +01:00
Kazuyuki Kamata d1094fe54c Fix: quit the application with Cmd + Q (#2404)
* Fix: quit the application with Cmd + Q

* Add unit test
2018-07-09 21:29:12 -07:00
Ryan C 02dd6f2cc2
Add indents to every line in the snippet. (#2394)
* Add indents to every line in the snippet.

* Apply indents earlier, so placeholders are updated.

* Add unit test.
2018-07-08 17:05:59 +01:00
Cedric Bosdonnat e199186218 Display an icon on non-win32 machines (#2363)
On Linux platforms, the icon needs to be a PNG file. On MacOS too
according to this page:

https://developer.apple.com/design/human-interface-guidelines/macos/icons-and-images/app-icon/
2018-07-08 08:02:14 -07:00
wheyerstrass bf93fe0d38 Added custom coloring option of dirty-marker (#2397)
* created color-customizable dirty-marker styled-component, extended configuration by dirty-marker color

* grouped dirty-marker custom color under "tabs" prefix, added getValue to Configuration mockup
2018-07-06 05:37:26 +01:00
Ryan C 84924fb6c7 Fix badges. (#2402) 2018-07-05 13:01:53 -07:00
Bryan Phelps 75fcdf7a08 Point appveyor to oni org build 2018-07-05 09:56:17 -07:00
Ryan C 8488e879f1
Fix logic error in travis build. (#2398) 2018-07-05 17:28:06 +01:00
Bryan Phelps d8f4fea85f Add Zac Sims as a backer - thank you! :) 2018-07-05 08:47:17 -07:00
keforbes 0cd41e7a20
Merge pull request #2328 from JosefKuchar/patch-1
Update copyright year
2018-07-05 09:20:31 -06:00
Ryan C 2546fd3fa9
CI Server Updates (#2346)
* Update the CI process killing to run on both Nvim and Oni.

* Tiny tidy up.

* Try adding before_install step to Travis.

* Swap CheckBinariesForBuild check to include both Windows and Mac.

* Only do a screenshot for master builds.

* Test Linux builds against Nvim 0.3.0.

Bring it inline with the Mac + Windows Binaries.

* Try killing chromedriver too.

* Reduce test wait time to be inline with commandline flag.

* Add macOS 10.11 config.

* Allow the 10.11 build to fail for now.

Should help this get merged, so the other changed can be benefited from.
2018-07-05 11:41:48 +01:00
wheyerstrass 3c6f8d4173 [WIP] Added coloring option for dirty-marker (#2391)
As discussed with @Akin909 and @hoschi in #1580 I created a styled component that replaces the current dirty-marker. Its `background-color` can be customized using the configuration key `editor.dirtyMarker.userColor`, which accepts css color values and defaults to the current themes `foreground` color.
2018-07-04 21:02:27 +01:00
Ryan C d218301de3
Reduce app folder size. (#2392)
* Try removing some unneeded folders from the build.

* Delete random new file.

* Update ignore list further.

* Swap to explicitly listing required files/folders.
2018-07-04 12:39:37 +01:00
Paul Roberts 5b5753ebb4 Workaround for devtools keyboard shortcuts not working on OSX (#2390) 2018-07-03 23:01:42 -07:00
Ryan C d0e88988f8
Allow the ONI_NEOVIM_PATH env var to be used on any platform. (#2389) 2018-07-03 11:01:00 +01:00
Akin 7b12a4f1ff
Feature/remove commandline timeout (#2334)
Following on from #2329 this PR removes the commandline menu's timeout and adds a special case to the tab color to handle commandline mode (aka same color as normal mode is used).

As I mentioned in #2329 the plan would be to add some documentation about using `<silent>` or `<Cmd>` to prevent any flickering. I think its arguably safe to say users using the `commandline` with mappings aka those who hit this bug are likely to be users who would be comfortable making the required changes to their mappings...

I've left off the changes re. keeping the elements vs. destroying them as at a glance this will require a much bigger/ less straightforward change than I currently can spare the time for
2018-07-02 18:14:04 +01:00
Bryan Phelps 9709cc44b6
Performance - Typing Predictions - Move from DOM -> Canvas / WebGL (#2219)
* Remove TypingPredictions as a react component

* Create shim screen with predictions

* Hack together PoC of pushing predictions to the screen layer

* Fix lint issues

* Add font weight

* Respect the debug.typingPredictions value

* Factor out ScreenWithPredictions

* Add test case

* Fix lint errors
2018-07-01 16:16:55 -07:00
Bryan Phelps cf1e75bb13
Fix regression where windows isn't shown on initial launch (#2380) 2018-07-01 15:08:32 -07:00
Ryan C 8919a86b16
Sort out CLI for Oni (#2372)
* Very first version of new CLI.

* Hook up calling on Windows.

* Try for Mac and Linux.

Need to test on Mac.

* Fix mac path.

* Small changes to CLI script.

* Fix bin pointing to CLI.

* Clarify changes in cli_args.

* Update Registry key check.

* Update Windows installer to get around path issues.

* Update Mac add to PATH command.

* Fix logic error.
2018-07-01 12:36:05 +01:00
Bryan Phelps 4615f90b6e
Electron: Use 'makeSingleInstance' API (#2377)
* Use 'makeSingleInstance' API instead of home-grown strategy

* Format with prettier

* Fix compilation error
2018-06-30 15:14:45 -07:00
Bryan Phelps c5d42ee8ef Add Jorrit Siebelink as a backer - thank you! :) 2018-06-30 11:02:24 -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
Akin a2cc7e9302
Feature/allow for generalised indent handling (#2375)
* pull upstream

* remove comment specific code, regularise indentation given to match correct indent amount
2018-06-30 15:42:59 +01:00
Paul Roberts 17d6dcaf37 Fix error when using Open With option in OSX finder (#2366)
* Fix error when using Open With option in OSX finder

* Remove unnecessary async keyword
2018-06-30 01:30:54 +01:00
keforbes 77ebbb1641
Merge pull request #2357 from keforbes/expand-web-tutorial
Expand word tutorial to include W, E, B
2018-06-28 08:11:39 -06:00
Colby DeHart 1462bf7463 added elixir syntaxes (#2325) 2018-06-28 07:33:16 +01:00
Akin fd7ac52b85
Feature/experimental indent guide lines (#2344)
* pull upstream

* add early stages indentlines plugin

* create separate interface fix wrong indentlines start position

* fix rendering errors with scroll

* remove unused interface vals and destructure line props

* add default experimental config for indentlines
off by default separate init into a function

* add comment detection and indentation handling
use atomic calls and swap tabstop in if no shiftwidth

* add ci test for indent guides

* undo accidental ciTest commit

* fix lint error

* use comment option not comment string as its more extensize
add functioning ci test

* add initial processing to check of line is wrapped

* rename functions and variables

* return metadata re wrapped lines and use this to calculate indent positions

* use adjusted top for comments and 0 indent lines

* convert to getwrapped lines to a reduce

* remove unindented line "optimisation" make sure height adjustment applies to comments as well

* add test for buffer manager class, make format comment public for testing

* pass neovim editor to indent layer to update layer with changes to comments for active file

* add more refined comment parsing

* tweak comment handling in indent plugin

* add newline between fixme comment and code

* indent end of multiline comment

* update tests to pass in valid comment string
2018-06-26 23:20:04 +01:00
keforbes 74a4dc7f22
Merge pull request #2358 from keforbes/tutorial-dot-command
Create tutorial for the dot command
2018-06-26 08:06:56 -06:00