feat(neovim): from scratch!

This commit is contained in:
2024-10-07 21:48:03 +01:00
parent e0fc7e698c
commit 7080c2325f
8 changed files with 262 additions and 2 deletions

83
nvim/lua/plugins/init.lua Normal file
View File

@@ -0,0 +1,83 @@
return {
{
"nvimdev/guard.nvim",
-- Builtin configuration, optional
dependencies = {
"nvimdev/guard-collection",
},
config = function()
local ft = require("guard.filetype")
ft("lua"):fmt("lsp"):append("stylua")
ft("typescript,javascript,typescriptreact"):fmt("prettierd"):lint("eslint_d")
end,
},
{
"nvim-telescope/telescope.nvim",
tag = "0.1.x",
dependencies = { "nvim-lua/plenary.nvim" },
},
{
"nvim-treesitter/nvim-treesitter",
build = ":TSUpdate",
config = function()
local configs = require("nvim-treesitter.configs")
configs.setup({
ensure_installed = { "lua", "javascript", "typescript", "html" },
sync_install = false,
highlight = { enable = true },
indent = { enable = true },
})
end,
},
{
"nvim-neo-tree/neo-tree.nvim",
branch = "v3.x",
dependencies = {
"nvim-lua/plenary.nvim",
"nvim-tree/nvim-web-devicons",
"MunifTanjim/nui.nvim",
{
"s1n7ax/nvim-window-picker",
version = "2.*",
config = function()
require("window-picker").setup({
filter_rules = {
include_current_win = false,
autoselect_one = true,
-- filter using buffer options
bo = {
-- if the file type is one of following, the window will be ignored
filetype = { "neo-tree", "neo-tree-popup", "notify" },
-- if the buffer type is one of following, the window will be ignored
buftype = { "terminal", "quickfix" },
},
},
})
end,
},
},
config = function()
require("neo-tree").setup({
close_if_last_window = false,
})
end,
},
{
"neovim/nvim-lspconfig",
config = function()
require("lspconfig").lua_ls.setup({
settings = {
Lua = {
diagnostics = { globals = { "vim", "require" } },
workspace = {
-- Make the server aware of Neovim runtime files
library = vim.api.nvim_get_runtime_file("", true),
},
},
},
})
end,
},
}