Skip to content

Commit 3684cf9

Browse files
authored
Merge pull request #1 from TheLeoP/fix_powershell
configuration fixes by TheLeoP to fix PowerShell integrated editor
2 parents 575f246 + fa2ac2c commit 3684cf9

File tree

5 files changed

+18
-34
lines changed

5 files changed

+18
-34
lines changed

after/plugin/dapui.lua

+11-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
11
local dapui = require("dapui")
22
local dap = require("dap")
33
dapui.setup()
4-
dap.listeners.after.event_initialized["dapui_config"] = function()
5-
dapui.open({})
6-
require('dap-powershell').correct_repl_colors()
4+
dap.listeners.before.attach.dapui_config = function()
5+
dapui.open()
6+
end
7+
dap.listeners.before.launch.dapui_config = function()
8+
dapui.open()
9+
end
10+
dap.listeners.before.event_terminated.dapui_config = function()
11+
dapui.close()
12+
end
13+
dap.listeners.before.event_exited.dapui_config = function()
14+
dapui.close()
715
end

after/plugin/lsp.lua

+1-14
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ lsp.ensure_installed({
88
'powershell_es',
99
'clangd'
1010
})
11+
lsp.skip_server_setup({'powershell_es'})
1112

1213
-- Fix Undefined global 'vim'
1314
lsp.nvim_workspace()
@@ -52,20 +53,6 @@ lsp.on_attach(function(client, bufnr)
5253
vim.keymap.set("i", "<C-h>", function() vim.lsp.buf.signature_help() end, opts)
5354
end)
5455

55-
-- PowerShell LSP config
56-
lsp.configure('powershell_es', {
57-
bundle_path = bundle_path,
58-
on_attach = on_attach,
59-
settings = {
60-
powershell = {
61-
codeFormatting = {
62-
Preset = 'OTBS'
63-
}
64-
}
65-
}
66-
})
67-
68-
6956
lsp.setup()
7057

7158
vim.diagnostic.config({

after/plugin/powershell.lua

+5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
require('powershell').setup({
22
bundle_path = vim.fn.stdpath "data" .. "/mason/packages/powershell-editor-services",
3+
settings={
4+
codeFormatting = {
5+
preset = 'OTBS'
6+
}
7+
}
38
})
49

lua/f0oster/init.lua

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
require("f0oster.set")
22
require("f0oster.remap")
3+
require("f0oster.packer")
34

45
-- DO NOT INCLUDE THIS
56
vim.opt.rtp:append("~/personal/streamer-tools")

lua/f0oster/packer.lua

-17
Original file line numberDiff line numberDiff line change
@@ -75,23 +75,6 @@ return require("packer").startup(function(use)
7575

7676
-- additions for PowerShell / DAP UI
7777
use({ "rcarriga/nvim-dap-ui", requires = { "mfussenegger/nvim-dap", "nvim-neotest/nvim-nio" } })
78-
use("m00qek/baleia.nvim")
79-
80-
use({
81-
"Willem-J-an/nvim-dap-powershell",
82-
dependencies = {
83-
"mfussenegger/nvim-dap",
84-
"rcarriga/nvim-dap-ui",
85-
{
86-
"m00qek/baleia.nvim",
87-
lazy = true,
88-
tag = "v1.4.0",
89-
},
90-
},
91-
config = function()
92-
require("dap-powershell").setup()
93-
end,
94-
})
9578

9679
use({
9780
"TheLeoP/powershell.nvim",

0 commit comments

Comments
 (0)