This commit is contained in:
kento2 2026-08-13 21:24:39 +02:00
parent 16c7b23408
commit 12cf227133
12 changed files with 122 additions and 29 deletions

View file

@ -0,0 +1,2 @@
vim.keymap.set("n", "<leader>b", "<cmd>Buffers<CR>")
vim.keymap.set("n", "<leader>f", "<cmd>Files<CR>")

View file

@ -0,0 +1,32 @@
-- https://lazy.folke.io/installation
-- Bootstrap lazy.nvim
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not (vim.uv or vim.loop).fs_stat(lazypath) then
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
if vim.v.shell_error ~= 0 then
vim.api.nvim_echo({
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
{ out, "WarningMsg" },
{ "\nPress any key to exit..." },
}, true, {})
vim.fn.getchar()
os.exit(1)
end
end
vim.opt.rtp:prepend(lazypath)
-- Make sure to setup `mapleader` and `maplocalleader` before
-- loading lazy.nvim so that mappings are correct.
-- This is also a good place to setup other settings (vim.opt)
vim.g.mapleader = " "
vim.g.maplocalleader = "\\"
-- Setup lazy.nvim
require("lazy").setup({
spec = {
{ import = "plugins" },
},
-- automatically check for plugin updates
checker = { enabled = true },
})

View file

@ -0,0 +1,21 @@
vim.lsp.config('chicken', {
cmd = {'chicken-lsp-server'},
filetypes = {'scheme'},
root_markers = {'Makefile', 'build.meson', '.git'},
})
vim.diagnostic.config({
virtual_text = true,
signs = true,
underline = true,
severity_sort = true,
})
vim.lsp.enable('chicken')
-- requires clang-tools-extra
vim.lsp.enable('clangd')
-- requires lua-language-server
vim.lsp.enable('lua_ls')
-- requires rust-analyzer
vim.lsp.enable('rust_analyzer')
vim.keymap.set("n", "<leader>l", function()
vim.lsp.buf.format({ async = true })
end, { desc = "Format buffer" })

View file

@ -0,0 +1,7 @@
vim.g.mapleader = " "
vim.g.maplocalleader = ","
vim.opt.smarttab = true
vim.opt.tabstop = 2
vim.opt.shiftwidth = 2
vim.opt.expandtab = true
vim.opt.clipboard = "unnamedplus" -- use system clipboard

View file

@ -0,0 +1,2 @@
vim.cmd.colorscheme("lunaperche")
vim.api.nvim_set_hl(0, "Normal", { bg = "NONE" })

View file

@ -0,0 +1,5 @@
return {
{
'https://github.com/junegunn/fzf.vim'
}
}

View file

@ -0,0 +1,27 @@
return {
{
'neovim/nvim-lspconfig',
event = { "BufReadPost", "BufNewFile" },
cmd = { "LspInfo", "LspInstall", "LspUninstall" },
},
{
'saghen/blink.cmp',
dependencies = { 'rafamadriz/friendly-snippets' },
version = '1.*',
opts = {
keymap = {
preset = 'super-tab',
['<C-u>'] = { 'scroll_signature_up', 'fallback' },
['<C-d>'] = { 'scroll_signature_down', 'fallback' },
},
completion = {
documentation = {
auto_show = true,
auto_show_delay_ms = 50,
}
},
signature = { enabled = true }
},
}
}