Compare commits

...

3 Commits

2 changed files with 69 additions and 122 deletions

View File

@ -184,8 +184,8 @@ require("lazy").setup({
dependencies = {
"neovim/nvim-lspconfig",
},
config = function()
require("fzf-lua").setup({
opts = {
winopts = {
preview = {
wrap = "wrap",
@ -199,60 +199,24 @@ require("lazy").setup({
multiline = 1,
},
fzf_colors = true,
})
end,
},
},
-- https://github.com/hrsh7th/nvim-cmp
-- https://github.com/Saghen/blink.cmp
{
"hrsh7th/nvim-cmp",
event = "InsertEnter",
dependencies = {
"hrsh7th/cmp-nvim-lsp",
"hrsh7th/cmp-buffer",
-- https://github.com/onsails/lspkind.nvim
"onsails/lspkind.nvim",
"saghen/blink.cmp",
version = "v0.*",
opts = {
keymap = {
select_and_accept = { "<CR>" },
},
config = function()
local cmp = require("cmp")
local lspkind = require("lspkind")
cmp.setup({
-- Custom
completion = {
autocomplete = false,
},
preselect = cmp.PreselectMode.None,
-- Largely copy from GitHub
mapping = cmp.mapping.preset.insert({
["<C-Space>"] = cmp.mapping.complete(),
["<CR>"] = cmp.mapping.confirm(),
["<C-e>"] = cmp.mapping.abort(),
}),
sources = cmp.config.sources({
{ name = "nvim_lsp" },
}, {
{
name = "buffer",
option = {
-- All buffers
get_bufnrs = function()
return vim.api.nvim_list_bufs()
end,
windows = {
autocomplete = {
auto_show = false,
},
},
}),
formatting = {
format = lspkind.cmp_format({
mode = "symbol",
maxwidth = 50,
ellipsis_char = "...",
show_labelDetails = true,
}),
nerd_font_variant = "mono",
},
})
end,
},
-- https://github.com/tpope/vim-projectionist
@ -286,12 +250,10 @@ require("lazy").setup({
-- https://github.com/svban/YankAssassin.nvim
{
"svban/YankAssassin.nvim",
config = function()
require("YankAssassin").setup({
opts = {
auto_normal = true,
auto_visual = true,
})
end,
},
},
-- https://github.com/echasnovski/mini.nvim
@ -446,8 +408,7 @@ require("lazy").setup({
build = {
":TSUpdate",
},
config = function()
require("nvim-treesitter.configs").setup({
opts = {
ensure_installed = {
"bash",
"c",
@ -477,8 +438,7 @@ require("lazy").setup({
incremental_selection = { enable = false },
textobjects = { enable = false },
indent = { enable = false },
})
end,
},
},
-- https://github.com/nvim-treesitter/nvim-treesitter-context
@ -487,12 +447,10 @@ require("lazy").setup({
dependencies = {
"nvim-treesitter/nvim-treesitter",
},
config = function()
require("treesitter-context").setup({
opts = {
enable = true,
max_lines = 2,
})
end,
},
},
-- https://github.com/neovim/nvim-lspconfig
@ -504,30 +462,19 @@ require("lazy").setup({
"python",
"typst",
},
dependencies = {
"hrsh7th/nvim-cmp",
},
config = function()
local lspconfig = require("lspconfig")
-- https://github.com/hrsh7th/cmp-nvim-lsp
-- https://github.com/hrsh7th/nvim-cmp/discussions/759
local capabilities = require("cmp_nvim_lsp").default_capabilities()
capabilities.textDocument.completion.completionItem.snippetSupport = false
-- Go
-- https://github.com/golang/tools/blob/master/gopls/doc/vim.md
-- https://github.com/golang/tools/blob/master/gopls/doc/settings.md
-- https://github.com/neovim/nvim-lspconfig/blob/master/doc/configs.md#gopls
-- https://github.com/neovim/nvim-lspconfig/issues/2542
lspconfig.gopls.setup({
capabilities = capabilities,
})
lspconfig.gopls.setup({})
-- Python
-- https://github.com/neovim/nvim-lspconfig/blob/master/doc/configs.md#pyright
lspconfig.pyright.setup({
capabilities = capabilities,
settings = {
pyright = {
-- Conflicts with Ruff

View File

@ -11,5 +11,5 @@ brew install \
fnm oven-sh/bun/bun deno uv \
just typst asciidoctor clang-format stylua taplo typos-cli typstyle marksman tinymist \
ollama gitleaks gh glab \
qmk/qmk/qmk daktilo \
qmk/qmk/qmk daktilo asciinema \
redis mysql-client