blank slate
This commit is contained in:
@@ -1,50 +0,0 @@
|
||||
return {
|
||||
"saghen/blink.cmp",
|
||||
dependencies = {
|
||||
"L3MON4D3/LuaSnip",
|
||||
},
|
||||
opts = {
|
||||
-- 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 = {
|
||||
"lazydev",
|
||||
"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,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
return {
|
||||
"stevearc/conform.nvim",
|
||||
config = function()
|
||||
require("conform").setup({
|
||||
formatters_by_ft = {
|
||||
lua = { "stylua" },
|
||||
javascript = { "prettier" },
|
||||
python = { "black" },
|
||||
nix = { "nixfmt" },
|
||||
css = { "prettier" },
|
||||
rust = { "rustfmt" },
|
||||
},
|
||||
format_on_save = true,
|
||||
undojoin = true,
|
||||
})
|
||||
end,
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
return {
|
||||
"folke/lazydev.nvim",
|
||||
ft = "lua", -- only load on lua files
|
||||
opts = {
|
||||
library = {
|
||||
-- See the configuration section for more details
|
||||
-- Load luvit types when the `vim.uv` word is found
|
||||
{ path = "${3rd}/luv/library", words = { "vim%.uv" } },
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -1,44 +0,0 @@
|
||||
return {
|
||||
"mfussenegger/nvim-lint",
|
||||
config = function()
|
||||
local lint = require("lint")
|
||||
|
||||
-- Explicitly define linters for each file type (without ast_grep)
|
||||
lint.linters_by_ft = {
|
||||
python = { "flake8" },
|
||||
javascript = { "eslint" },
|
||||
typescript = { "eslint" },
|
||||
}
|
||||
|
||||
-- Only show diagnostics close to the cursor
|
||||
vim.diagnostic.config({
|
||||
virtual_text = {
|
||||
spacing = 4,
|
||||
-- You can make prefix dynamic based on severity using a function
|
||||
prefix = function(diagnostic)
|
||||
local icons = {
|
||||
[vim.diagnostic.severity.ERROR] = " ",
|
||||
[vim.diagnostic.severity.WARN] = " ",
|
||||
[vim.diagnostic.severity.INFO] = " ",
|
||||
[vim.diagnostic.severity.HINT] = " ",
|
||||
}
|
||||
return icons[diagnostic.severity] or "●"
|
||||
end,
|
||||
},
|
||||
signs = false,
|
||||
underline = true,
|
||||
update_in_insert = false,
|
||||
})
|
||||
|
||||
-- Auto-run the linter only for the configured filetypes
|
||||
vim.api.nvim_create_autocmd("BufWritePost", {
|
||||
pattern = "!*.lua",
|
||||
callback = function()
|
||||
local ft = vim.bo.filetype
|
||||
if lint.linters_by_ft[ft] then
|
||||
lint.try_lint()
|
||||
end
|
||||
end,
|
||||
})
|
||||
end,
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
return {
|
||||
"neovim/nvim-lspconfig",
|
||||
config = function()
|
||||
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",
|
||||
})
|
||||
end,
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
return {
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
lazy = false,
|
||||
branch = "master",
|
||||
build = ":TSUpdate",
|
||||
config = function()
|
||||
require("nvim-treesitter.configs").setup({
|
||||
highlight = { enable = true },
|
||||
indent = { enable = true },
|
||||
ensure_installed = {
|
||||
"bash",
|
||||
"html",
|
||||
"latex",
|
||||
"javascript",
|
||||
"json",
|
||||
"lua",
|
||||
"norg",
|
||||
"markdown",
|
||||
"markdown_inline",
|
||||
"query",
|
||||
"regex",
|
||||
"tsx",
|
||||
"typescript",
|
||||
"python",
|
||||
"vim",
|
||||
"yaml",
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
||||
Reference in New Issue
Block a user