do I look like I want to write a commit message for my nvim config?
This commit is contained in:
@@ -94,6 +94,19 @@ auto("CompleteDonePre", {
|
||||
return
|
||||
end
|
||||
|
||||
-- TODO: we need to truncate the item.label to ensure that we don't
|
||||
-- duplicate any text below is my attempt to start work on it:
|
||||
--
|
||||
-- local cursor = vim.api.nvim_win_get_cursor(0)
|
||||
-- local line = vim.api.nvim_buf_get_lines(
|
||||
-- vim.api.nvim_win_get_buf(0),
|
||||
-- cursor[1] - 1,
|
||||
-- cursor[1],
|
||||
-- false
|
||||
-- )[1]
|
||||
-- item.label = string.gsub(item.label, string.sub(line, cursor[2] + 1), "")
|
||||
-- item.insertText = item.label
|
||||
|
||||
-- if the item isn't a snippet then we might want to create a snippet
|
||||
if item.label and item.kind and item.insertTextFormat then
|
||||
if item.insertTextFormat ~= 2 and item.kind == 3 then
|
||||
|
@@ -2,9 +2,6 @@ local M = {}
|
||||
|
||||
--- setup vim lsp options
|
||||
function M.setup()
|
||||
-- ensure the severs are setup
|
||||
require("core.lsp.servers")
|
||||
|
||||
-- confgiure lsp
|
||||
vim.diagnostic.config {
|
||||
virtual_lines = {
|
||||
|
@@ -1,11 +0,0 @@
|
||||
local servers = require("core").mason.packages.lsps
|
||||
|
||||
-- enable the servers I want
|
||||
for _, server in ipairs(servers) do
|
||||
-- skip jdtls, we start this on our own
|
||||
if servers == "jdtls" then
|
||||
goto continue
|
||||
end
|
||||
vim.lsp.enable(server)
|
||||
::continue::
|
||||
end
|
@@ -25,5 +25,12 @@ auto('LspAttach', {
|
||||
if client:supports_method('textDocument/linkedEditingRange') then
|
||||
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
|
||||
vim.lsp.on_type_formatting.enable(true, { client_id = client.id })
|
||||
end
|
||||
end
|
||||
})
|
||||
|
Reference in New Issue
Block a user