Skip to content
This repository was archived by the owner on Sep 21, 2019. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions autoload/ensime.vim
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,6 @@ function! ensime#com_en_usages(args, range) abort
return s:call_plugin('com_en_usages', [a:args, a:range])
endfunction

function! ensime#com_en_package_inspect(args, range) abort
return s:call_plugin('com_en_package_inspect', [a:args, a:range])
endfunction

function! ensime#com_en_sym_search(args, range) abort
return s:call_plugin('com_en_sym_search', [a:args, a:range])
endfunction
Expand All @@ -83,10 +79,6 @@ function! ensime#com_en_declaration_split(args, range) abort
return s:call_plugin('com_en_declaration_split', [a:args, a:range])
endfunction

function! ensime#fun_en_package_decl() abort
return s:call_plugin('fun_en_package_decl', [[], []])
endfunction

function! ensime#com_en_symbol_by_name(args, range) abort
return s:call_plugin('com_en_symbol_by_name', [a:args, a:range])
endfunction
Expand Down
30 changes: 0 additions & 30 deletions doc/ensime.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ CONTENTS *ensime-contents*
Refactoring Commands..................|ensime-refactoring-commands|
Function API..............................|ensime-function-api|
Usage.....................................|ensime-usage|
Package Inspector.....................|ensime-package-inspector|
Debugger..............................|ensime-debugger|
Configuration.............................|ensime-configuration|
Mappings..............................|ensime-mappings|
Expand Down Expand Up @@ -184,16 +183,6 @@ available.
Runs a typecheck on file in the current buffer, displaying any errors and
warnings in the buffer.

*:EnShowPackage*
:EnShowPackage [package]

Displays a hierarchical view of a package, including all top-level types,
in a vertical split. See |ensime-package-inspector| for actions you can
take from this window.

If [package] is given it must be a fully-qualified package name. If not,
the package of the current source file is used.

*:EnUsages*
:EnUsages

Expand Down Expand Up @@ -304,30 +293,11 @@ EnCompleteFunc()
>
TODO: we should namespace all exposed functions.

TODO: EnPackageDecl? This is an implementation detail for opening items from
Package Inspector IIRC. Expose a <Plug> mapping that users can set for
that, not the function.

==============================================================================
USAGE *ensime-usage*

Package Inspector |ensime-package-inspector|
Debugger |ensime-debugger|

------------------------------------------------------------------------------
PACKAGE INSPECTOR *ensime-package-inspector*

The Package Inspector is a hierarchical view of the members of a package,
accessed using the |:EnShowPackage| command as described above.

Once in the Inspector buffer, you can jump to the definition of a particular
symbol by pressing <Space> on the symbol's line. There is a bit of a lag from
the server, but the symbol's definition will be opened in a new vertical
split.

Stay tuned for the Inspector to grow new features as additional planned
server support comes along.

------------------------------------------------------------------------------
DEBUGGER *ensime-debugger*

Expand Down
12 changes: 0 additions & 12 deletions ensime_shared/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -381,18 +381,6 @@ def symbol_at_point_req(self, open_definition, display=False):
"typehint": "SymbolAtPointReq",
"file": self.editor.path()})

def inspect_package(self, args):
pkg = None
if not args:
pkg = Util.extract_package_name(self.editor.getlines())
self.editor.message('package_inspect_current')
else:
pkg = args[0]
self.send_request({
"typehint": "InspectPackageByPathReq",
"path": pkg
})

def open_declaration(self, args, range=None):
self.log.debug('open_declaration: in')
self.symbol_at_point_req(True)
Expand Down
1 change: 0 additions & 1 deletion ensime_shared/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
"manual_doc": "Go to {}",
"missing_debug_class": "You must specify a class to debug",
"notify_break": "Execution paused at breakpoint line {} in {}",
"package_inspect_current": "Using currently focused package...",
"prompt_server_install":
"Please run :EnInstall to install the ENSIME server for Scala {scala_version}",
"spawned_browser": "Opened tab {}",
Expand Down
29 changes: 0 additions & 29 deletions ensime_shared/editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,11 +215,6 @@ def initialize(self):
# not even sure how this is currently working when only set once.
self._vim.command('set omnifunc=EnCompleteFunc')

# TODO: custom filetype ftplugin
self._vim.command(
'autocmd FileType package_info nnoremap <buffer> <Space> :call EnPackageDecl()<CR>')
self._vim.command('autocmd FileType package_info setlocal splitright')

# TODO: make this a R/W property?
def cursor(self):
"""Get the cursor position in the current window as a ``(row, column)``
Expand Down Expand Up @@ -327,30 +322,6 @@ def raw_message(self, message, silent=False):
else:
vim.command(cmd)

def symbol_for_inspector_line(self, lineno):
"""Given a line number for the Package Inspector window, returns the
fully-qualified name for the symbol on that line.
"""
def indent(line):
n = 0
for char in line:
if char == ' ':
n += 1
else:
break
return n / 2

lines = self._vim.current.buffer[:lineno]
i = indent(lines[-1])
fqn = [lines[-1].split()[-1]]

for line in reversed(lines):
if indent(line) == i - 1:
i -= 1
fqn.insert(0, line.split()[-1])

return ".".join(fqn)

def display_notes(self, notes):
"""Renders "notes" reported by ENSIME, such as typecheck errors."""

Expand Down
8 changes: 0 additions & 8 deletions ensime_shared/ensime.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,10 +198,6 @@ def com_en_declaration_split(self, client, args, range=None):
def com_en_symbol_by_name(self, client, args, range=None):
client.symbol_by_name(args, range)

@execute_with_client()
def fun_en_package_decl(self, client, args, range=None):
client.open_decl_for_inspector_symbol()

@execute_with_client()
def com_en_symbol(self, client, args, range=None):
client.symbol(args, range)
Expand Down Expand Up @@ -284,10 +280,6 @@ def com_en_clients(self, client, args, range=None):
def com_en_sym_search(self, client, args, range=None):
client.symbol_search(args)

@execute_with_client()
def com_en_package_inspect(self, client, args, range=None):
client.inspect_package(args)

@execute_with_client(quiet=True)
def au_vim_enter(self, client, filename):
client.vim_enter(filename)
Expand Down
25 changes: 0 additions & 25 deletions ensime_shared/protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ def register_responses_handlers(self):
self.handlers["DebugVmError"] = self.handle_debug_vm_error
self.handlers["RefactorDiffEffect"] = self.apply_refactor
self.handlers["ImportSuggestions"] = self.handle_import_suggestions
self.handlers["PackageInfo"] = self.handle_package_info
self.handlers["FalseResponse"] = self.handle_false_response

def handle_incoming_response(self, call_id, payload):
Expand Down Expand Up @@ -76,9 +75,6 @@ def handle_debug_vm_error(self, call_id, payload):
def handle_import_suggestions(self, call_id, payload):
raise NotImplementedError()

def handle_package_info(self, call_id, payload):
raise NotImplementedError()

def handle_symbol_search(self, call_id, payload):
raise NotImplementedError()

Expand Down Expand Up @@ -139,27 +135,6 @@ def handle_import_suggestions(self, call_id, payload):
if choice:
self.add_import(choice)

def handle_package_info(self, call_id, payload):
package = payload["fullName"]

def add(member, indentLevel):
indent = " " * indentLevel
t = member["declAs"]["typehint"] if member["typehint"] == "BasicTypeInfo" else ""
line = "{}{}: {}".format(indent, t, member["name"])
self.editor.append(line)
if indentLevel < 4:
for m in member["members"]:
add(m, indentLevel + 1)

# Create a new buffer 45 columns wide
opts = {'buftype': 'nofile', 'bufhidden': 'wipe', 'buflisted': False,
'filetype': 'package_info', 'swapfile': False}
self.editor.split_window('package_info', vertical=True, size=45, bufopts=opts)

self.editor.append(str(package))
for member in payload["members"]:
add(member, 1)

def handle_symbol_search(self, call_id, payload):
"""Handler for symbol search results"""
self.log.debug('handle_symbol_search: in %s', Pretty(payload))
Expand Down
5 changes: 0 additions & 5 deletions plugin/ensime.vim
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ command! -nargs=* -range EnTypeCheck call ensime#com_en_type_check([<f-args>], '
command! -nargs=* -range EnType call ensime#com_en_type([<f-args>], '')
command! -nargs=* -range EnUsages call ensime#com_en_usages([<f-args>], '')
command! -nargs=* -range EnSearch call ensime#com_en_sym_search([<f-args>], '')
command! -nargs=* -range EnShowPackage call ensime#com_en_package_inspect([<f-args>], '')
command! -nargs=* -range EnDeclaration call ensime#com_en_declaration([<f-args>], '')
command! -nargs=* -range EnDeclarationSplit call ensime#com_en_declaration_split([<f-args>], '')
command! -nargs=* -range EnSymbolByName call ensime#com_en_symbol_by_name([<f-args>], '')
Expand All @@ -99,10 +98,6 @@ command! -nargs=* -range EnToggleFullType call ensime#com_en_toggle_fulltype([<f
command! -nargs=* -range EnOrganizeImports call ensime#com_en_organize_imports([<f-args>], '')
command! -nargs=* -range EnAddImport call ensime#com_en_add_import([<f-args>], '')

function! EnPackageDecl() abort
return ensime#fun_en_package_decl()
endfunction

function! EnCompleteFunc(a, b) abort
return ensime#fun_en_complete_func(a:a, a:b)
endfunction
Expand Down
8 changes: 0 additions & 8 deletions rplugin/python3/ensime.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,6 @@ def com_en_debug_step_out(self, *args, **kwargs):
def com_en_debug_next(self, *args, **kwargs):
super(NeovimEnsime, self).com_en_debug_next(*args, **kwargs)

@neovim.command('EnShowPackage', **command_params)
def com_en_package_inspect(self, *args, **kwargs):
super(NeovimEnsime, self).com_en_package_inspect(*args, **kwargs)

@neovim.command('EnDebugContinue', **command_params)
def com_en_debug_continue(self, *args, **kwargs):
super(NeovimEnsime, self).com_en_debug_continue(*args, **kwargs)
Expand All @@ -145,10 +141,6 @@ def com_en_debug_backtrace(self, *args, **kwargs):
def com_en_rename(self, *args, **kwargs):
super(NeovimEnsime, self).com_en_rename(*args, **kwargs)

@neovim.function('EnPackageDecl', sync=True)
def fun_en_package_decl(self, *args, **kwargs):
super(NeovimEnsime, self).fun_en_package_decl(*args, **kwargs)

@neovim.command('EnInline', **command_params)
def com_en_inline(self, *args, **kwargs):
super(NeovimEnsime, self).com_en_inline(*args, **kwargs)
Expand Down