Public Access
update
This commit is contained in:
@@ -0,0 +1,53 @@
|
||||
return {
|
||||
"saghen/blink.cmp",
|
||||
-- optional: provides snippets for the snippet source
|
||||
dependencies = { "rafamadriz/friendly-snippets" },
|
||||
|
||||
-- use a release tag to download pre-built binaries
|
||||
version = "1.*",
|
||||
-- AND/OR build from source, requires nightly: https://rust-lang.github.io/rustup/concepts/channels.html#working-with-nightly-rust
|
||||
-- build = 'cargo build --release',
|
||||
-- If you use nix, you can build from source using latest nightly rust with:
|
||||
-- build = 'nix run .#build-plugin',
|
||||
|
||||
---@module 'blink.cmp'
|
||||
---@type blink.cmp.Config
|
||||
opts = {
|
||||
-- 'default' (recommended) for mappings similar to built-in completions (C-y to accept)
|
||||
-- 'super-tab' for mappings similar to vscode (tab to accept)
|
||||
-- 'enter' for enter to accept
|
||||
-- 'none' for no mappings
|
||||
--
|
||||
-- All presets have the following mappings:
|
||||
-- C-space: Open menu or open docs if already open
|
||||
-- C-n/C-p or Up/Down: Select next/previous item
|
||||
-- C-e: Hide menu
|
||||
-- C-k: Toggle signature help (if signature.enabled = true)
|
||||
--
|
||||
-- See :h blink-cmp-config-keymap for defining your own keymap
|
||||
keymap = { preset = "super-tab" },
|
||||
|
||||
appearance = {
|
||||
-- 'mono' (default) for 'Nerd Font Mono' or 'normal' for 'Nerd Font'
|
||||
-- Adjusts spacing to ensure icons are aligned
|
||||
nerd_font_variant = "mono",
|
||||
},
|
||||
|
||||
-- (Default) Only show the documentation popup when manually triggered
|
||||
completion = { documentation = { auto_show = false } },
|
||||
|
||||
-- Default list of enabled providers defined so that you can extend it
|
||||
-- elsewhere in your config, without redefining it, due to `opts_extend`
|
||||
sources = {
|
||||
default = { "lsp", "path", "snippets", "buffer" },
|
||||
},
|
||||
|
||||
-- (Default) Rust fuzzy matcher for typo resistance and significantly better performance
|
||||
-- You may use a lua implementation instead by using `implementation = "lua"` or fallback to the lua implementation,
|
||||
-- when the Rust fuzzy matcher is not available, by using `implementation = "prefer_rust"`
|
||||
--
|
||||
-- See the fuzzy documentation for more information
|
||||
fuzzy = { implementation = "prefer_rust_with_warning" },
|
||||
},
|
||||
opts_extend = { "sources.default" },
|
||||
}
|
||||
@@ -1,44 +0,0 @@
|
||||
return {
|
||||
{
|
||||
"hrsh7th/cmp-nvim-lsp",
|
||||
},
|
||||
{
|
||||
"L3MON4D3/LuaSnip",
|
||||
dependencies = {
|
||||
"saadparwaiz1/cmp_luasnip",
|
||||
"rafamadriz/friendly-snippets",
|
||||
},
|
||||
},
|
||||
{
|
||||
"hrsh7th/nvim-cmp",
|
||||
config = function()
|
||||
local cmp = require("cmp")
|
||||
require("luasnip.loaders.from_vscode").lazy_load()
|
||||
|
||||
cmp.setup({
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
require("luasnip").lsp_expand(args.body)
|
||||
end,
|
||||
},
|
||||
window = {
|
||||
completion = cmp.config.window.bordered(),
|
||||
documentation = cmp.config.window.bordered(),
|
||||
},
|
||||
mapping = cmp.mapping.preset.insert({
|
||||
["<C-b>"] = cmp.mapping.scroll_docs(-4),
|
||||
["<C-f>"] = cmp.mapping.scroll_docs(4),
|
||||
["<C-Space>"] = cmp.mapping.complete(),
|
||||
["<C-e>"] = cmp.mapping.abort(),
|
||||
["<CR>"] = cmp.mapping.confirm({ select = true }),
|
||||
}),
|
||||
sources = cmp.config.sources({
|
||||
{ name = "nvim_lsp" },
|
||||
{ name = "luasnip" },
|
||||
}, {
|
||||
{ name = "buffer" },
|
||||
}),
|
||||
})
|
||||
end,
|
||||
},
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
return {
|
||||
-- {
|
||||
-- "CopilotC-Nvim/CopilotChat.nvim",
|
||||
-- branch = "canary",
|
||||
-- dependencies = {
|
||||
-- { "github/copilot.vim" }, -- or github/copilot.vim
|
||||
-- { "nvim-lua/plenary.nvim" }, -- for curl, log wrapper
|
||||
-- },
|
||||
-- build = "make tiktoken", -- Only on MacOS or Linux
|
||||
-- opts = {
|
||||
-- debug = true, -- Enable debugging
|
||||
-- -- default window options
|
||||
-- window = {
|
||||
-- layout = "float", -- 'vertical', 'horizontal', 'float', 'replace'
|
||||
-- width = 0.8, -- fractional width of parent, or absolute width in columns when > 1
|
||||
-- height = 0.8, -- fractional height of parent, or absolute height in rows when > 1
|
||||
-- -- Options below only apply to floating windows
|
||||
-- relative = "editor", -- 'editor', 'win', 'cursor', 'mouse'
|
||||
-- border = "single", -- 'none', single', 'double', 'rounded', 'solid', 'shadow'
|
||||
-- row = nil, -- row position of the window, default is centered
|
||||
-- col = nil, -- column position of the window, default is centered
|
||||
-- title = "Copilot Chat", -- title of chat window
|
||||
-- footer = nil, -- footer of chat window
|
||||
-- zindex = 1, -- determines if window is on top or below other floating windows
|
||||
-- },
|
||||
-- },
|
||||
-- vim.api.nvim_set_keymap("n", "<leader>gh", ":CopilotChatToggle<CR>", { noremap = true, silent = true }),
|
||||
-- vim.api.nvim_set_keymap("n", "<leader>gr", ":CopilotChatReset<CR>", { noremap = true, silent = true }),
|
||||
-- -- See Commands section for default commands if you want to lazy load on them
|
||||
-- },
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
return {
|
||||
-- "github/copilot.vim",
|
||||
}
|
||||
+32
-21
@@ -9,15 +9,18 @@ return {
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
config = function()
|
||||
require("mason-lspconfig").setup({
|
||||
ensure_installed = { "lua_ls", "ts_ls", "svelte", "tailwindcss", "cssls", "rust_analyzer" },
|
||||
ensure_installed = { "lua_ls", "ts_ls", "svelte", "tailwindcss", "cssls" },
|
||||
automatic_enable = true,
|
||||
})
|
||||
end,
|
||||
},
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
config = function()
|
||||
local capabilities = require("cmp_nvim_lsp").default_capabilities()
|
||||
config = function(_, opts)
|
||||
local original_capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||
local capabilities = require("blink.cmp").get_lsp_capabilities(original_capabilities)
|
||||
local lspconfig = require("lspconfig")
|
||||
|
||||
lspconfig.lua_ls.setup({
|
||||
capabilities = capabilities,
|
||||
})
|
||||
@@ -32,31 +35,39 @@ return {
|
||||
})
|
||||
lspconfig.cssls.setup({
|
||||
capabilities = capabilities,
|
||||
})
|
||||
lspconfig.rust_analyzer.setup({
|
||||
capabilities = capabilities,
|
||||
settings = {
|
||||
css = {
|
||||
lint = {
|
||||
unknownAtRules = "ignore",
|
||||
},
|
||||
},
|
||||
scss = {
|
||||
lint = {
|
||||
unknownAtRules = "ignore",
|
||||
},
|
||||
},
|
||||
less = {
|
||||
lint = {
|
||||
unknownAtRules = "ignore",
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
lspconfig.sourcekit.setup({
|
||||
capabilities = capabilities,
|
||||
})
|
||||
lspconfig.jedi_language_server.setup({
|
||||
capabilities = capabilities,
|
||||
})
|
||||
lspconfig.gopls.setup({
|
||||
capabilities = capabilities,
|
||||
})
|
||||
lspconfig.ltex.setup({
|
||||
on_attach = function()
|
||||
require("ltex_extra").setup({
|
||||
load_langs = { "de-DE" },
|
||||
})
|
||||
end,
|
||||
filetypes = { "markdown", "text", "latex" },
|
||||
capabilities = capabilities,
|
||||
})
|
||||
vim.keymap.set("n", "gd", vim.lsp.buf.definition, {})
|
||||
vim.keymap.set("n", "K", vim.lsp.buf.hover, {})
|
||||
vim.keymap.set({ "n", "v" }, "<leader>ca", vim.lsp.buf.code_action, {})
|
||||
|
||||
vim.diagnostic.config({
|
||||
virtual_text = true,
|
||||
signs = true,
|
||||
update_in_insert = true,
|
||||
underline = true,
|
||||
severity_sort = false,
|
||||
float = true,
|
||||
})
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
return {
|
||||
"barreiroleo/ltex_extra.nvim",
|
||||
ft = { "markdown", "tex" },
|
||||
dependencies = { "neovim/nvim-lspconfig" },
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
return {
|
||||
"folke/trouble.nvim",
|
||||
opts = {}, -- for default options, refer to the configuration section for custom setup.
|
||||
cmd = "Trouble",
|
||||
keys = {
|
||||
{
|
||||
"<leader>xx",
|
||||
"<cmd>Trouble diagnostics toggle focus=true<cr>",
|
||||
desc = "Diagnostics (Trouble)",
|
||||
},
|
||||
{
|
||||
"<leader>xX",
|
||||
"<cmd>Trouble diagnostics toggle filter.buf=0 focus=true<cr>",
|
||||
desc = "Buffer Diagnostics (Trouble)",
|
||||
},
|
||||
{
|
||||
"<leader>cs",
|
||||
"<cmd>Trouble symbols toggle focus=false<cr>",
|
||||
desc = "Symbols (Trouble)",
|
||||
},
|
||||
{
|
||||
"<leader>cl",
|
||||
"<cmd>Trouble lsp toggle focus=false win.position=right<cr>",
|
||||
desc = "LSP Definitions / references / ... (Trouble)",
|
||||
},
|
||||
{
|
||||
"<leader>xL",
|
||||
"<cmd>Trouble loclist toggle<cr>",
|
||||
desc = "Location List (Trouble)",
|
||||
},
|
||||
{
|
||||
"<leader>xQ",
|
||||
"<cmd>Trouble qflist toggle<cr>",
|
||||
desc = "Quickfix List (Trouble)",
|
||||
},
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user