-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
219 additions
and
140 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
return { | ||
filetypes = { "html", "markdown" }, | ||
settings = { documentFormatting = false }, | ||
init_options = { provideFormatter = false }, | ||
settings = { documentFormattingProvider = false }, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,38 @@ | ||
return {} | ||
-- Register homemade LSP servers (mypygls): | ||
local lspconfig = require("lspconfig") | ||
local configs = require("lspconfig.configs") | ||
|
||
configs.mypygls = { | ||
default_config = { | ||
cmd = { "mypygls" }, | ||
filetypes = { "python" }, | ||
root_dir = function(fname) | ||
return lspconfig.util.find_git_ancestor(fname) | ||
end, | ||
settings = {}, | ||
}, | ||
} | ||
|
||
-- map it in mason-lspconfig | ||
require("mason-lspconfig.mappings.server").lspconfig_to_package["mypygls"] = "mypygls" | ||
|
||
local python_utils = require("wax.lsp.python-utils") | ||
|
||
return { | ||
on_new_config = function(config, new_workspace) | ||
local python_path = python_utils.get_python_path(new_workspace) | ||
local new_workspace_name = to_workspace_name(new_workspace) | ||
|
||
if python_path == "python" then | ||
local msg = "LSP python (mypygls) - keeping previous python path '%s' for new_root_dir '%s'" | ||
log.debug(msg:format(config.cmd[1], new_workspace)) | ||
return config | ||
else | ||
local msg = "LSP python (mypygls) - '%s' using path %s" | ||
log.info(msg:format(new_workspace_name, python_path)) | ||
|
||
config.cmd = { python_path, "-m", "mypygls" } | ||
return config | ||
end | ||
end, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.