Fix perlpls (update config to change deprecated settings)
This commit is contained in:
parent
5205b3f44c
commit
08bf84229b
8
init.vim
8
init.vim
@ -1041,6 +1041,7 @@ if $USER =~ "^jry$" && $HOSTNAME =~ "gnu"
|
|||||||
lua <<EOF
|
lua <<EOF
|
||||||
|
|
||||||
local jix_lsp = require 'jix.lsp'
|
local jix_lsp = require 'jix.lsp'
|
||||||
|
local util = require 'lspconfig.util'
|
||||||
|
|
||||||
-- Mappings.
|
-- Mappings.
|
||||||
-- See `:help vim.diagnostic.*` for documentation on any of the below functions
|
-- See `:help vim.diagnostic.*` for documentation on any of the below functions
|
||||||
@ -1067,9 +1068,9 @@ lua <<EOF
|
|||||||
-- Show signature for function under cursor (virker i skrivende stund ikke med subroutine signatures)
|
-- Show signature for function under cursor (virker i skrivende stund ikke med subroutine signatures)
|
||||||
--vim.keymap.set('n', '<C-f>', vim.lsp.buf.signature_help, bufopts)
|
--vim.keymap.set('n', '<C-f>', vim.lsp.buf.signature_help, bufopts)
|
||||||
-- Format file with perltidy
|
-- Format file with perltidy
|
||||||
vim.keymap.set('n', '<leader>f', vim.lsp.buf.formatting, bufopts)
|
vim.keymap.set('n', '<leader>f', function() vim.lsp.buf.format { async = true } end, bufopts)
|
||||||
-- Format visual selection with perltidy
|
-- Format visual selection with perltidy
|
||||||
vim.keymap.set('v', '<leader>f', vim.lsp.buf.range_formatting, bufopts)
|
vim.keymap.set('v', '<leader>f', function() vim.lsp.buf.format { async = true } end, bufopts)
|
||||||
|
|
||||||
-- Slå Neomake fra i buffer for at undgå dobbeltarbejde
|
-- Slå Neomake fra i buffer for at undgå dobbeltarbejde
|
||||||
vim.api.nvim_command('silent NeomakeDisableBuffer')
|
vim.api.nvim_command('silent NeomakeDisableBuffer')
|
||||||
@ -1077,6 +1078,8 @@ lua <<EOF
|
|||||||
|
|
||||||
local config = {
|
local config = {
|
||||||
cmd = { 'jix-shell', 'pls' },
|
cmd = { 'jix-shell', 'pls' },
|
||||||
|
filetypes = { 'perl' },
|
||||||
|
root_dir = util.find_git_ancestor,
|
||||||
settings = {
|
settings = {
|
||||||
-- Se https://metacpan.org/pod/PLS#OPTIONS for mulige options
|
-- Se https://metacpan.org/pod/PLS#OPTIONS for mulige options
|
||||||
perl = {
|
perl = {
|
||||||
@ -1090,6 +1093,7 @@ lua <<EOF
|
|||||||
perltidyrc = '~/jobxx/perltidyrc',
|
perltidyrc = '~/jobxx/perltidyrc',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
single_file_support = true,
|
||||||
on_attach = on_attach,
|
on_attach = on_attach,
|
||||||
handlers = jix_lsp.handlers,
|
handlers = jix_lsp.handlers,
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user