Clean up jedi_language_server
This commit is contained in:
@@ -17,32 +17,10 @@
|
||||
return {
|
||||
cmd = { "jedi-language-server", },
|
||||
single_file_support = true,
|
||||
-- For more info see https://github.com/pappasam/jedi-language-server#configurationSources
|
||||
-- and https://github.com/pappasam/coc-jedi#configuration (good descriptions)
|
||||
-- For more info see:
|
||||
-- - https://github.com/pappasam/jedi-language-server#configuration
|
||||
-- - https://github.com/pappasam/coc-jedi#configuration (good descriptions)
|
||||
init_options = {
|
||||
completion = {
|
||||
-- If your language client supports CompletionItem snippets but you don't like them,
|
||||
-- disable them by setting this option to true.
|
||||
-- type: boolean
|
||||
-- default: false
|
||||
disableSnippets = false,
|
||||
-- Return all completion results in initial completion request.
|
||||
-- Set to true if your language client does not support completionItem/resolve.
|
||||
-- type: boolean
|
||||
-- default: false
|
||||
resolveEagerly = false,
|
||||
-- A list of regular expressions.
|
||||
-- If any regular expression in ignorePatterns matches a completion's name,
|
||||
-- that completion item is not returned to the client.
|
||||
-- type: string[]
|
||||
-- default: []
|
||||
-- In general, you should prefer the default value for this option.
|
||||
-- Jedi is very good at filtering values for end users.
|
||||
-- That said, there are situations where IDE developers,
|
||||
-- or some programmers in some code bases, may want to filter some completions by name.
|
||||
-- This flexible interface is provided to accommodate these advanced use cases.
|
||||
ignorePatterns = {},
|
||||
},
|
||||
-- Built-in diagnostics seem to be very basic,
|
||||
-- to the point where you are wondering if it's even active.
|
||||
-- Will use iamcco/diagnostic-languageserver instead.
|
||||
@@ -51,73 +29,6 @@ return {
|
||||
-- type: boolean
|
||||
-- default: true
|
||||
enable = false,
|
||||
-- When diagnostics are enabled, run on document open
|
||||
-- type: boolean
|
||||
-- default: true
|
||||
didOpen = true,
|
||||
-- When diagnostics are enabled, run on in-memory document change
|
||||
-- (eg, while you're editing, without needing to save to disk)
|
||||
-- type: boolean
|
||||
-- default: true
|
||||
didChange = true,
|
||||
-- When diagnostics are enabled, run on document save (to disk)
|
||||
-- type: boolean
|
||||
-- default: true
|
||||
didSave = true,
|
||||
},
|
||||
hover = {
|
||||
-- Enable (or disable) all hover text.
|
||||
-- If set to false, will cause the hover method not to be registered to the language server.
|
||||
-- type: boolean
|
||||
-- default: true
|
||||
enable = true,
|
||||
-- disable.[jedi-type].all
|
||||
-- Disable all hover text of jedi-type specified.
|
||||
-- type: boolean
|
||||
-- default: false
|
||||
-- disable.[jedi-type].names
|
||||
-- Disable hover text identified by name in list of jedi-type specified.
|
||||
-- type: string[]
|
||||
-- default: []
|
||||
-- disable.[jedi-type].fullNames
|
||||
-- Disable hover text identified by the fully qualified name in list of jedi-type specified.
|
||||
-- If no fully qualified name can be found, jedi-language-server will default to
|
||||
-- the name to prevent any unexpected behavior for users
|
||||
-- (relevant for jedi types like keywords that don't have full names).
|
||||
-- type: string[]
|
||||
-- default: []
|
||||
disable = {
|
||||
class = { all = false, names = {}, fullNames = {}, },
|
||||
-- Need to escape lua keyword
|
||||
["function"] = { all = false, names = {}, fullNames = {}, },
|
||||
instance = { all = false, names = {}, fullNames = {}, },
|
||||
keyword = { all = false, names = {}, fullNames = {}, },
|
||||
module = { all = false, names = {}, fullNames = {}, },
|
||||
param = { all = false, names = {}, fullNames = {}, },
|
||||
path = { all = false, names = {}, fullNames = {}, },
|
||||
property = { all = false, names = {}, fullNames = {}, },
|
||||
statement = { all = false, names = {}, fullNames = {}, },
|
||||
},
|
||||
},
|
||||
jediSettings = {
|
||||
-- Modules that jedi will directly import without analyzing.
|
||||
-- Improves autocompletion but loses goto definition.
|
||||
-- type: string[]
|
||||
-- default: []
|
||||
-- If you're noticing that modules like numpy and pandas are taking a super long time to load
|
||||
-- and you value completions / signatures over goto definition,
|
||||
-- I recommend using this option like this:
|
||||
-- autoImportModules = { "numpy", "pandas" },
|
||||
autoImportModules = {},
|
||||
-- Completions are by default case insensitive.
|
||||
-- Set to false to make completions case sensitive.
|
||||
-- type: boolean
|
||||
-- default: true
|
||||
caseInsensitiveCompletion = true,
|
||||
-- Print jedi debugging messages to stderr.
|
||||
-- type: boolean
|
||||
-- default: false
|
||||
debug = false,
|
||||
},
|
||||
-- The preferred MarkupKind for all jedi-language-server messages that take MarkupContent.
|
||||
-- type: string
|
||||
@@ -126,27 +37,6 @@ return {
|
||||
-- If there is no client-preferred configuration, jedi language server users "plaintext".
|
||||
-- markupKindPreferred = "markdown",
|
||||
workspace = {
|
||||
-- Add additional paths for Jedi's analysis.
|
||||
-- Useful with vendor directories, packages in a non-standard location, etc.
|
||||
-- You probably won't need to use this, but you'll be happy it's here when you need it!
|
||||
-- type: string[]
|
||||
-- default: []
|
||||
-- Non-absolute paths are relative to your project root.
|
||||
-- For example, let's say your Python project is structured like this:
|
||||
-- ├── funky
|
||||
-- │ └── haha.py
|
||||
-- ├── poetry.lock
|
||||
-- ├── pyproject.toml
|
||||
-- └── test.py
|
||||
-- Assume that funky/haha.py contains 1 line, x = 12,
|
||||
-- and your build system does some wizardry that makes haha importable just like os or pathlib.
|
||||
-- In this example, if you want to have this same non-standard behavior with jedi-language-server,
|
||||
-- put the following:
|
||||
-- extraPaths = { "funky" }
|
||||
-- When editing test.py, you'll get completions, goto definition,
|
||||
-- and all other lsp features for the line `from haha import ....`
|
||||
-- Again, you probably don't need this.
|
||||
extraPaths = {},
|
||||
symbols = {
|
||||
-- Performance optimization that sets names of folders that are ignored for workspace/symbols.
|
||||
-- type: string[]
|
||||
@@ -159,12 +49,6 @@ return {
|
||||
"build", "scripts", "incoax_tests.egg-info",
|
||||
"node_modules",
|
||||
},
|
||||
-- Maximum number of symbols returned by a call to workspace/symbols.
|
||||
-- type: number
|
||||
-- default: 20
|
||||
-- A value less than or equal to zero removes the maximum
|
||||
-- and allows jedi-language-server to return all workplace symbols found by jedi.
|
||||
maxSymbols = 20,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user