Compare commits
3
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9fbdb4e259 | ||
|
|
4724eb8dd5 | ||
|
|
e71b388358 |
No files matched your search
@@ -0,0 +1,28 @@
|
|||||||
|
BSD 3-Clause License
|
||||||
|
|
||||||
|
Copyright (c) 2026, anth64
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
|
1. Redistributions of source code must retain the above copyright notice, this
|
||||||
|
list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||||
|
this list of conditions and the following disclaimer in the documentation
|
||||||
|
and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
3. Neither the name of the copyright holder nor the names of its
|
||||||
|
contributors may be used to endorse or promote products derived from
|
||||||
|
this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
|
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||||
|
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
|
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||||
|
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||||
|
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||||
|
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||||
|
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
@@ -22,3 +22,4 @@ Language servers and formatters, per language:
|
|||||||
- JavaScript/TypeScript: typescript (7+, uses `tsc --lsp`)
|
- JavaScript/TypeScript: typescript (7+, uses `tsc --lsp`)
|
||||||
- HTML/CSS/JSON: vscode-langservers-extracted
|
- HTML/CSS/JSON: vscode-langservers-extracted
|
||||||
- Lua: lua-language-server
|
- Lua: lua-language-server
|
||||||
|
- Python: basedpyright, ruff
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
local format = require("plugins/vis-plug").plugins.format
|
||||||
|
|
||||||
|
return format.stdio_formatter(function(win)
|
||||||
|
return "ruff format" .. format.with_filename(win, " --stdin-filename ") .. " -"
|
||||||
|
end)
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
return { "set expandtab on", "set tabwidth 4" }
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
return {
|
||||||
|
name = "basedpyright",
|
||||||
|
cmd = "basedpyright-langserver --stdio",
|
||||||
|
roots = { "pyproject.toml", "setup.py", "requirements.txt", ".git" },
|
||||||
|
}
|
||||||
@@ -18,7 +18,15 @@ plug.plugins.lspc.message_level = 2
|
|||||||
require("set")
|
require("set")
|
||||||
require("remap")
|
require("remap")
|
||||||
|
|
||||||
local filetypes = { "csharp", "html", "java", "javascript", "json", "lua" }
|
local filetypes = {
|
||||||
|
"csharp",
|
||||||
|
"html",
|
||||||
|
"java",
|
||||||
|
"javascript",
|
||||||
|
"json",
|
||||||
|
"lua",
|
||||||
|
"python",
|
||||||
|
}
|
||||||
settings = {}
|
settings = {}
|
||||||
for _, syntax in ipairs(filetypes) do
|
for _, syntax in ipairs(filetypes) do
|
||||||
settings[syntax] = require("ftplugin/" .. syntax)
|
settings[syntax] = require("ftplugin/" .. syntax)
|
||||||
@@ -31,6 +39,7 @@ local servers = {
|
|||||||
"java",
|
"java",
|
||||||
"javascript",
|
"javascript",
|
||||||
"json",
|
"json",
|
||||||
|
"python",
|
||||||
"typescript",
|
"typescript",
|
||||||
}
|
}
|
||||||
local ls_map = plug.plugins.lspc.ls_map
|
local ls_map = plug.plugins.lspc.ls_map
|
||||||
@@ -38,7 +47,7 @@ for _, syntax in ipairs(servers) do
|
|||||||
ls_map[syntax] = require("lsp/" .. syntax)
|
ls_map[syntax] = require("lsp/" .. syntax)
|
||||||
end
|
end
|
||||||
|
|
||||||
local formatters = { "ansi_c", "cpp", "csharp" }
|
local formatters = { "ansi_c", "cpp", "csharp", "python" }
|
||||||
local format = plug.plugins.format
|
local format = plug.plugins.format
|
||||||
local on_save_syntaxes = {}
|
local on_save_syntaxes = {}
|
||||||
for _, syntax in ipairs(formatters) do
|
for _, syntax in ipairs(formatters) do
|
||||||
|
|||||||
Reference in new issue
Block a user