more stuff
This commit is contained in:
@@ -8,6 +8,8 @@ local function on_list(opts)
|
||||
|
||||
-- get to the closest reference to the cursor (likely the one gr or gd was
|
||||
-- called on)
|
||||
--
|
||||
-- TODO: switch this to use opts.idx?
|
||||
local closest, distance = 1, false
|
||||
for i, item in ipairs(opts.items) do
|
||||
if item.filename and vim.fn.expand("%:p") == item.filename then
|
||||
|
@@ -26,11 +26,12 @@ auto('LspAttach', {
|
||||
pcall(vim.lsp.linked_editing_range.enable, true, { client_id = client.id })
|
||||
end
|
||||
|
||||
-- enable type formatting which allows lsps to modify text while you're
|
||||
-- typing for example if you insert {} in a string in python basedpyright
|
||||
-- will change the string to a format string
|
||||
if client:supports_method('textDocument/onTypeFormatting') then
|
||||
pcall(vim.lsp.on_type_formatting.enable, true, { client_id = client.id })
|
||||
end
|
||||
-- disabled for now cause I don't like it
|
||||
-- -- enable type formatting which allows lsps to modify text while you're
|
||||
-- -- typing for example if you insert {} in a string in python basedpyright
|
||||
-- -- will change the string to a format string
|
||||
-- if client:supports_method('textDocument/onTypeFormatting') then
|
||||
-- pcall(vim.lsp.on_type_formatting.enable, true, { client_id = client.id })
|
||||
-- end
|
||||
end
|
||||
})
|
||||
|
Reference in New Issue
Block a user