almost everything

This commit is contained in:
2026-04-10 15:27:58 +01:00
parent 624fefdd18
commit 6f7793bde4
13 changed files with 469 additions and 1 deletions

View File

@@ -0,0 +1,14 @@
vim.pack.add({ { src = "https://github.com/stevearc/conform.nvim", name = "conform" } })
require("conform").setup({
formatters_by_ft = {
lua = { "stylua" },
javascript = { "prettier" },
python = { "black" },
nix = { "nixfmt" },
css = { "prettier" },
rust = { "rustfmt" },
},
format_on_save = true,
undojoin = true,
})

View File

@@ -0,0 +1,85 @@
vim.pack.add({
{ src = "https://github.com/neovim/nvim-lspconfig", name = "lspconfig" },
{ src = "https://github.com/saghen/blink.cmp", name = "blink" },
})
vim.lsp.config("lua_ls", {
settings = {
Lua = {
-- Tell the server to let Neovim handle snippet expansion
completion = {
callSnippet = "Replace",
},
-- Use LuaJIT (which Neovim uses)
runtime = {
version = "LuaJIT",
},
},
},
})
vim.lsp.config("emmet_ls", {
-- capabilities = require("cmp_nvim_lsp").default_capabilities(),
filetypes = { "html", "css", "javascriptreact", "typescriptreact" },
init_options = {
html = {
options = {
["bem.enabled"] = true,
},
},
},
})
vim.lsp.enable({
"lua_ls",
"ts_ls",
"pylsp",
"cssls",
"nixd",
"rust_analyzer",
"emmet_ls",
})
vim.o.pumborder = "rounded"
require("blink.cmp").setup({
-- Snippet configuration
-- snippets = {
-- preset = "luasnip", -- Tells blink.cmp to use LuaSnip
-- },
fuzzy = { implementation = "lua" },
signature = {
enabled = true,
},
completion = {
list = {
selection = {
preselect = false,
auto_insert = true,
},
},
},
-- Keymaps
keymap = {
["<Tab>"] = { "select_next", "snippet_forward", "fallback" },
},
sources = {
default = {
"lsp", -- (Equivalent to cmp-nvim-lsp)
"snippets", -- (Handled by the snippets config, replaces cmp_luasnip source)
"buffer", -- (Equivalent to cmp-buffer)
"path", -- (Equivalent to cmp-path)
-- "cmdline", -- Generally configured separately, but often included by default
},
providers = {
-- lazydev = {
-- name = "LazyDev",
-- module = "lazydev.integrations.blink",
-- -- make lazydev completions top priority (see `:h blink.cmp`)
-- score_offset = 100,
-- },
},
},
})

View File

@@ -0,0 +1,24 @@
vim.pack.add({ { src = "https://github.com/nvim-treesitter/nvim-treesitter", name = "treesitter" } })
require("nvim-treesitter").setup({
highlight = { enable = true },
indent = { enable = true },
})
require("nvim-treesitter").install({
"bash",
"html",
"latex",
"javascript",
"json",
"lua",
"markdown",
"markdown_inline",
"query",
"regex",
"tsx",
"typescript",
"python",
"vim",
"yaml",
})