more fixes to get powershell working, and remove Go LSP
This commit is contained in:
parent
cd02e79c22
commit
46ecf3aec5
17
init.lua
17
init.lua
|
@ -467,6 +467,9 @@ require('lazy').setup({
|
||||||
-- word under your cursor when your cursor rests there for a little while.
|
-- word under your cursor when your cursor rests there for a little while.
|
||||||
-- See `:help CursorHold` for information about when this is executed
|
-- See `:help CursorHold` for information about when this is executed
|
||||||
--
|
--
|
||||||
|
-- on_attach = function(client, bufnr)
|
||||||
|
-- vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc')
|
||||||
|
-- end,
|
||||||
-- When you move your cursor, the highlights will be cleared (the second autocommand).
|
-- When you move your cursor, the highlights will be cleared (the second autocommand).
|
||||||
local client = vim.lsp.get_client_by_id(event.data.client_id)
|
local client = vim.lsp.get_client_by_id(event.data.client_id)
|
||||||
if client and client.server_capabilities.documentHighlightProvider then
|
if client and client.server_capabilities.documentHighlightProvider then
|
||||||
|
@ -501,7 +504,7 @@ require('lazy').setup({
|
||||||
-- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/
|
-- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/
|
||||||
local servers = {
|
local servers = {
|
||||||
clangd = {},
|
clangd = {},
|
||||||
gopls = {},
|
-- gopls = {},
|
||||||
-- pyright = {},
|
-- pyright = {},
|
||||||
rust_analyzer = {},
|
rust_analyzer = {},
|
||||||
powershell_es = {},
|
powershell_es = {},
|
||||||
|
@ -555,6 +558,18 @@ require('lazy').setup({
|
||||||
server.capabilities = vim.tbl_deep_extend('force', {}, capabilities, server.capabilities or {})
|
server.capabilities = vim.tbl_deep_extend('force', {}, capabilities, server.capabilities or {})
|
||||||
require('lspconfig')[server_name].setup(server)
|
require('lspconfig')[server_name].setup(server)
|
||||||
end,
|
end,
|
||||||
|
|
||||||
|
powershell_es = function()
|
||||||
|
local lspconfig = require 'lspconfig'
|
||||||
|
lspconfig.powershell_es.setup {
|
||||||
|
init_options = { enableProfileLoading = false },
|
||||||
|
filetypes = { 'ps1' },
|
||||||
|
on_attach = function(client, bufnr)
|
||||||
|
vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc')
|
||||||
|
end,
|
||||||
|
settings = { powershell = { codeFormatting = { Preset = 'OTBS' } } },
|
||||||
|
}
|
||||||
|
end,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
-- Godot's LSP - Requires Godot to be running
|
-- Godot's LSP - Requires Godot to be running
|
||||||
|
|
Loading…
Reference in New Issue