nvim: formatting and minor fixes
This commit is contained in:
parent
b048858c40
commit
7282fcd409
5 changed files with 225 additions and 217 deletions
|
|
@ -16,7 +16,11 @@ return {
|
|||
-- C-k: Toggle signature help (if signature.enabled = true)
|
||||
--
|
||||
-- See :h blink-cmp-config-keymap for defining your own keymap
|
||||
keymap = { preset = "default" },
|
||||
keymap = {
|
||||
preset = "default",
|
||||
["<Tab>"] = { "select_and_accept" },
|
||||
["<S-Tab>"] = { "select_next", "fallback_to_mappings" },
|
||||
},
|
||||
|
||||
appearance = {
|
||||
nerd_font_variant = "mono",
|
||||
|
|
|
|||
|
|
@ -62,6 +62,11 @@ return {
|
|||
-- set <leader>cpd and <leader>cpe to disable/enable copilot
|
||||
vim.keymap.set("n", "<leader>cpe", "<cmd>Copilot enable<CR>")
|
||||
vim.keymap.set("n", "<leader>cpd", "<cmd>Copilot disable<CR>")
|
||||
vim.keymap.set("i", "<C-J>", 'copilot#Accept("\\<CR>")', {
|
||||
expr = true,
|
||||
replace_keycodes = false,
|
||||
})
|
||||
vim.g.copilot_no_tab_map = true
|
||||
end,
|
||||
},
|
||||
-- {
|
||||
|
|
|
|||
|
|
@ -43,7 +43,6 @@ return {
|
|||
"ts_ls",
|
||||
"cssls",
|
||||
"tailwindcss",
|
||||
"pyright",
|
||||
},
|
||||
handlers = {
|
||||
function(server_name) -- default handler (optional)
|
||||
|
|
|
|||
|
|
@ -18,27 +18,26 @@ return {
|
|||
ensure_installed = {
|
||||
"stylua",
|
||||
"jq",
|
||||
"mypy",
|
||||
"ruff",
|
||||
"basedpyright",
|
||||
"black",
|
||||
},
|
||||
handlers = {
|
||||
["mypy"] = function(source_name, methods)
|
||||
local options = {
|
||||
extra_args = function()
|
||||
local command = "which python"
|
||||
local handle = io.popen(command)
|
||||
local python_path = ""
|
||||
if handle then
|
||||
python_path = handle:read("*a")
|
||||
python_path = string.gsub(python_path, "\n", "")
|
||||
handle:close()
|
||||
end
|
||||
return { "--python-executable", python_path }
|
||||
end,
|
||||
}
|
||||
null_ls.register(null_ls.builtins.diagnostics.mypy.with(options))
|
||||
end,
|
||||
-- ["mypy"] = function(source_name, methods)
|
||||
-- local options = {
|
||||
-- extra_args = function()
|
||||
-- local command = "which python"
|
||||
-- local handle = io.popen(command)
|
||||
-- local python_path = ""
|
||||
-- if handle then
|
||||
-- python_path = handle:read("*a")
|
||||
-- python_path = string.gsub(python_path, "\n", "")
|
||||
-- handle:close()
|
||||
-- end
|
||||
-- return { "--python-executable", python_path }
|
||||
-- end,
|
||||
-- }
|
||||
-- null_ls.register(null_ls.builtins.diagnostics.mypy.with(options))
|
||||
-- end,
|
||||
--[[ ["ruff"] = function(source_name, methods)
|
||||
null_ls.register(null_ls.builtins.diagnostics.ruff)
|
||||
--require('mason-null-ls').default_setup(source_name, methods) -- to maintain default behavior
|
||||
|
|
|
|||
|
|
@ -77,6 +77,7 @@ vim.keymap.set("v", "<", "<gv")
|
|||
vim.keymap.set("v", ">", ">gv")
|
||||
|
||||
-- Indent with tab
|
||||
vim.keymap.set("i", "<Tab>", "<Tab>")
|
||||
vim.keymap.set("v", "<Tab>", ">gv")
|
||||
vim.keymap.set("v", "<S-Tab>", "<gv")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue