diagnostic

This commit is contained in:
Kacper Marzecki 2026-08-02 02:30:02 +02:00
parent 656898074e
commit 5b44802b68
4 changed files with 23 additions and 23 deletions

View File

@ -240,10 +240,6 @@ vim.keymap.set({ "n", "v" }, "<C-Down>", "j", { noremap = true, silent = true })
vim.keymap.set({ "n", "v" }, "<C-Left>", "h", { noremap = true, silent = true })
vim.keymap.set({ "n", "v" }, "<C-Right>", "l", { noremap = true, silent = true })
-- ctrl-n p to navigate lsp suggestions, next and previous
vim.keymap.set("i", "<C-n>", "<cmd>lua cmp.mapping.select_next_item()<CR>", { noremap = true, silent = true })
vim.keymap.set("i", "<C-p>", "<cmd>lua cmp.mapping.select_previous_item()<CR>", { noremap = true, silent = true })
-- map leader u v c to CsvViewEnable display_mode=border with description `CSV View (commas)`
vim.keymap.set("n", "<leader>uvc", "<cmd>CsvViewEnable display_mode=border<CR>", { desc = "CSV View (commas)" })
-- map leader u v t to CsvViewEnable delimiter=\t display_mode=border with description `CSV View (tabs)`

View File

@ -5,5 +5,6 @@
vim.opt.laststatus = 3
vim.g.maplocalleader = ","
vim.diagnostic.config({ virtual_text = true })
vim.opt.completeopt = { "menuone", "noselect", "popup" }
vim.opt.scrolloff = 20

View File

@ -5,15 +5,10 @@ return {
},
{
"saghen/blink.cmp",
dependencies = { "fang2hou/blink-copilot" },
opts = {
sources = {
providers = {
copilot = {
module = "blink-copilot",
},
},
},
},
enabled = false,
},
{
"fang2hou/blink-copilot",
enabled = false,
},
}

View File

@ -64,16 +64,15 @@ if vim.uv.fs_stat(pair_ls_config) then
dofile(pair_ls_config)
end
---------------------
vim.api.nvim_create_autocmd("LspAttach", {
group = vim.api.nvim_create_augroup("my.lsp", {}),
callback = function(args)
local opts = { remap = false }
local client = assert(vim.lsp.get_client_by_id(args.data.client_id))
local builtin = require("telescope.builtin")
-- along with your other config
if client:supports_method("textDocument/completion") then
vim.lsp.completion.enable(true, client.id, args.buf, { autotrigger = true })
end
if client:supports_method("textDocument/formatting") then
-- the most important part
@ -110,11 +109,17 @@ end
vim.api.nvim_create_autocmd("FileType", {
pattern = "elixir",
callback = function(args)
local root = vim.fs.root(args.buf, { "mix.exs", ".git" })
if not root then
return
end
vim.lsp.start({
name = "exofx-lsp",
cmd_env = { MIX_ENV = "test" },
cmd = { "mix", "exofx.lsp" },
root_dir = vim.fs.root(args.buf, { "mix.exs", ".git" }),
root_dir = root,
cmd_cwd = root,
-- capabilities = vim.lsp.protocol.make_client_capabilities(),
})
end,
@ -179,10 +184,13 @@ vim.api.nvim_create_autocmd({ "LspAttach", "BufEnter" }, {
end,
})
vim.keymap.set("i", "<M-Space>", function()
local cmp = require("blink.cmp")
cmp.reload()
cmp.show()
print("asd")
if vim.fn.pumvisible() == 1 then
vim.api.nvim_feedkeys(vim.api.nvim_replace_termcodes("<C-e>", true, false, true), "n", false)
end
vim.schedule(function()
vim.lsp.completion.get()
end)
end, { desc = "Force LSP completion" })
-- vim.api.nvim_create_autocmd("FileType", {
-- pattern = "elixir",