Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cp-dsl-replication
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
oceandsl
cp-dsl-replication
Commits
8dc1cb85
Commit
8dc1cb85
authored
Apr 29, 2021
by
Reiner Jung
Browse files
Options
Downloads
Patches
Plain Diff
Initial commit
parent
d439c14d
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
README.md
+52
-1
52 additions, 1 deletion
README.md
example.vimrc
+28
-0
28 additions, 0 deletions
example.vimrc
filetype.vim
+8
-0
8 additions, 0 deletions
filetype.vim
with
88 additions
and
1 deletion
README.md
+
52
−
1
View file @
8dc1cb85
# cp-dsl-replication
# CP-DSL Replication Package
The CP-DSL provides a set of plugins for Eclipse integration,
an Language Server (LS) implementing the Language Server Protocol (LSP)
and a Jupyter kernel. In the following, we describe how to install
the CP-DSL in Eclipse, Vim, and Juypter. In addition, we provide
instructions how to setup an experiment with MITgcm.
## Eclipse Setup
The latest Eclipse plugins are hosted at
https://maui.se.informatik.uni-kiel.de/repo/oceandsl/
Whereas the latest snapshot is located in the
`snapshot`
directory and
releases in the respective release directories.
To install the language support
-
open Eclipse
-
click on
*Help*
>
*Install New Software...*
This opens the installer dialog.
-
Add a new resource by clicking on
*Add...*
-
In the then opened dialog enter
*cp-dsl*
as name and a repository
URL, e.g., https://maui.se.informatik.uni-kiel.de/repo/oceandsl/snapshot
-
Click on
*Add*
-
Now in the installer a feature Configuration DSL is shown, select it.
-
Click on
*Next >*
-
Click on
*Finish*
-
As our packages are not signed (yet), you may have to confirm installation.
## Vim Setup
For the Vim setup, we use its extension mechanism and a special LSP
plugins (https://github.com/prabirshrestha/vim-lsp).
Its installation is as follows:
-
Copy
`javassist-3.12.1.GA.jar`
and
`org.oceandsl.configuration.ide-1.0.0-SNAPSHOT-ls.jar`
to a tooling
directory, e.g.,
`~/bin`
in your home directory.
-
Copy the
`example.vimrc`
to your home folder and rename it to
`.vimrc`
. In case you already have one, you need to merge both
files accordingly.
-
Open the
`.vimrc`
in an editor and fix the path to the two jar files.
-
Create a directory
`~/.vim`
-
Start
`vim`
-
Type
`:PlugInstall`
, this should install all necessary plugin parts.
-
Copy the
`filetype.vim`
to the
`~/.vim`
directory. This provides
filetype information to ensure the correct LSP is used.
-
You can check the status that the LS is available with
`:LspStatus`
.
## Jupyter Setup
Jupyter can be run in a docker container or setup natively on a machine.
Here, we describe the native Jupyter setup.
This diff is collapsed.
Click to expand it.
example.vimrc
0 → 100644
+
28
−
0
View file @
8dc1cb85
set nocompatible hidden laststatus=2
if !filereadable('~/.vim/plug.vim')
silent !curl --insecure -fLo ~/.vim/plug.vim
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
endif
source ~/.vim/plug.vim
call plug#begin('~/.vim/plugged')
Plug 'prabirshrestha/asyncomplete.vim'
Plug 'prabirshrestha/vim-lsp'
Plug 'prabirshrestha/asyncomplete-lsp.vim'
call plug#end()
" pip install python-language-server
au User lsp_setup call lsp#register_server({
\ 'name': 'oconf',
\ 'cmd': ['java',
\ '-cp', 'javassist-3.12.1.GA.jar',
\ '-jar','org.oceandsl.configuration.ide-1.0.0-SNAPSHOT-ls.jar'],
\ 'allowlist': ['oconf'],
\ })
let g:lsp_diagnostics_enabled = 1
let g:lsp_signs_enabled = 1 " enable signs
let g:lsp_diagnostics_echo_cursor = 1 " enable echo under cursor when in normal mode
let g:lsp_log_file = expand('~/vim-lsp.log')
This diff is collapsed.
Click to expand it.
filetype.vim
0 → 100644
+
8
−
0
View file @
8dc1cb85
" my filetype file
if
exists
(
"did_load_filetypes"
)
finish
endif
augroup filetypedetect
au
!
BufRead
,
BufNewFile
*
.
oconf
setfiletype
oconf
augroup END
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment