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

@ -1,25 +1,4 @@
vim.g.mapleader = " " require("config.options")
vim.g.maplocalleader = "," for _, file in ipairs(vim.fn.globpath(vim.fn.stdpath("config") .. "/lua/config", "*.lua", false, true)) do
vim.cmd.colorscheme("lunaperche") require("config." .. vim.fn.fnamemodify(file, ":t:r"))
vim.opt.smarttab = true end
vim.opt.tabstop = 2
vim.opt.shiftwidth = 2
vim.opt.clipboard = "unnamedplus" -- use system clipboard
vim.pack.add{
{ src = 'https://github.com/neovim/nvim-lspconfig' },
{ src = 'https://github.com/junegunn/fzf.vim' },
}
vim.lsp.config('chicken', {
cmd = {'chicken-lsp-server'},
filetypes = {'scheme'},
root_markers = {'Makefile', 'build.meson', '.git'},
})
vim.lsp.enable('chicken')
vim.lsp.enable('clangd')
vim.lsp.enable('lua_ls')
vim.keymap.set("n", "<leader>b", "<cmd>Buffers<CR>")
vim.keymap.set("n", "<leader>f", "<cmd>Files<CR>")

View file

@ -0,0 +1,7 @@
{
"blink.cmp": { "branch": "main", "commit": "78336bc89ee5365633bcf754d93df01678b5c08f" },
"friendly-snippets": { "branch": "main", "commit": "6cd7280adead7f586db6fccbd15d2cac7e2188b9" },
"fzf.vim": { "branch": "master", "commit": "d2a59a992a2455f609c0fde2ebd84427ea8f919a" },
"lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
"nvim-lspconfig": { "branch": "master", "commit": "51dbf5359da86721662c87ca10eb73add973737b" }
}

View file

@ -0,0 +1,10 @@
{
"extras": [
],
"install_version": 8,
"news": {
"NEWS.md": "11866"
},
"version": 8
}

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 }
},
}
}

View file

@ -1,5 +1,9 @@
{ {
"plugins": { "plugins": {
"blink.cmp": {
"rev": "0e63407c28bd09ef0d3604478823f7f92dd8d9ec",
"src": "https://github.com/Saghen/blink.cmp"
},
"fzf.vim": { "fzf.vim": {
"rev": "d2a59a992a2455f609c0fde2ebd84427ea8f919a", "rev": "d2a59a992a2455f609c0fde2ebd84427ea8f919a",
"src": "https://github.com/junegunn/fzf.vim" "src": "https://github.com/junegunn/fzf.vim"

View file

@ -1,5 +1,5 @@
export ENV="$HOME/.kshrc" export ENV="$HOME/.kshrc"
export PATH="$HOME/.local/bin":"$PATH" export PATH="$HOME/.local/bin":"$PATH":"/usr/lib/jvm/default-jdk/bin":"$HOME/.cargo/bin"
export MANPATH="/usr/local/man":"$MANPATH" export MANPATH="/usr/local/man":"$MANPATH"
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/:/usr/lib/pkgconfig export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/:/usr/lib/pkgconfig
export XKB_DEFAULT_LAYOUT=de export XKB_DEFAULT_LAYOUT=de
@ -16,6 +16,3 @@ if is_login; then
echo 'Press return to start gui' echo 'Press return to start gui'
read && exec startx read && exec startx
fi fi
# OPS config
export OPS_DIR="$HOME/.ops"
export PATH="$HOME/.ops/bin:$PATH"