mirror of https://github.com/LazyVim/starter
Stuff
parent
33f38e1a9c
commit
62b04df145
|
@ -1,3 +1,10 @@
|
||||||
-- Autocmds are automatically loaded on the VeryLazy event
|
-- Autocmds are automatically loaded on the VeryLazy event
|
||||||
-- Default autocmds that are always set: https://github.com/jul-o/LazyVim/blob/main/lua/lazyvim/config/autocmds.lua
|
-- Default autocmds that are always set: https://github.com/jul-o/LazyVim/blob/main/lua/lazyvim/config/autocmds.lua
|
||||||
-- Add any additional autocmds here
|
-- Add any additional autocmds here
|
||||||
|
|
||||||
|
-- vim.api.nvim_create_autocmd({ "BufWritePre" }, {
|
||||||
|
-- group = vim.api.nvim_create_augroup("format_on_save", {}),
|
||||||
|
-- callback = function()
|
||||||
|
-- vim.lsp.buf.format()
|
||||||
|
-- end,
|
||||||
|
-- })
|
||||||
|
|
|
@ -15,6 +15,7 @@ require("lazy").setup({
|
||||||
-- import any extras modules here
|
-- import any extras modules here
|
||||||
{ import = "lazyvim.plugins.extras.lang.typescript" },
|
{ import = "lazyvim.plugins.extras.lang.typescript" },
|
||||||
{ import = "lazyvim.plugins.extras.lang.json" },
|
{ import = "lazyvim.plugins.extras.lang.json" },
|
||||||
|
{ import = "lazyvim.plugins.extras.lang.tailwind" },
|
||||||
-- { import = "lazyvim.plugins.extras.ui.mini-animate" },
|
-- { import = "lazyvim.plugins.extras.ui.mini-animate" },
|
||||||
-- import/override with your plugins
|
-- import/override with your plugins
|
||||||
{ import = "plugins" },
|
{ import = "plugins" },
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
return {
|
||||||
|
"brenoprata10/nvim-highlight-colors",
|
||||||
|
config = {},
|
||||||
|
}
|
|
@ -1,11 +1,11 @@
|
||||||
return {
|
return {
|
||||||
"jul-o/leap-ast.nvim",
|
-- "jul-o/leap-ast.nvim",
|
||||||
-- dir = '~/projects/nvim-plugins/leap-ast.nvim',
|
-- -- dir = '~/projects/nvim-plugins/leap-ast.nvim',
|
||||||
dependencies = {
|
-- dependencies = {
|
||||||
"ggandor/leap.nvim",
|
-- "ggandor/leap.nvim",
|
||||||
"nvim-treesitter/nvim-treesitter",
|
-- "nvim-treesitter/nvim-treesitter",
|
||||||
},
|
-- },
|
||||||
config = function()
|
-- config = function()
|
||||||
vim.keymap.set({ "n", "x", "o" }, "<leader>s", require("leap-ast").leap, { desc = "Leap AST" })
|
-- vim.keymap.set({ "n", "x", "o" }, "<leader>s", require("leap-ast").leap, { desc = "Leap AST" })
|
||||||
end,
|
-- end,
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,46 @@
|
||||||
return {
|
return {
|
||||||
"neovim/nvim-lspconfig",
|
"neovim/nvim-lspconfig",
|
||||||
opts = {
|
opts = {
|
||||||
servers = { eslint = {} },
|
servers = {
|
||||||
|
tailwindcss = {
|
||||||
|
filetypes_exclude = { "markdown" },
|
||||||
|
},
|
||||||
|
eslint = {},
|
||||||
|
emmet_language_server = {
|
||||||
|
filetypes = {
|
||||||
|
"css",
|
||||||
|
"eruby",
|
||||||
|
"html",
|
||||||
|
"javascript",
|
||||||
|
"javascriptreact",
|
||||||
|
"less",
|
||||||
|
"sass",
|
||||||
|
"scss",
|
||||||
|
"svelte",
|
||||||
|
"pug",
|
||||||
|
"typescriptreact",
|
||||||
|
"vue",
|
||||||
|
},
|
||||||
|
-- Read more about this options in the [vscode docs](https://code.visualstudio.com/docs/editor/emmet#_emmet-configuration).
|
||||||
|
-- **Note:** only the options listed in the table are supported.
|
||||||
|
init_options = {
|
||||||
|
--- @type string[]
|
||||||
|
excludeLanguages = {},
|
||||||
|
--- @type table<string, any> [Emmet Docs](https://docs.emmet.io/customization/preferences/)
|
||||||
|
preferences = {},
|
||||||
|
--- @type boolean Defaults to `true`
|
||||||
|
showAbbreviationSuggestions = true,
|
||||||
|
--- @type "always" | "never" Defaults to `"always"`
|
||||||
|
showExpandedAbbreviation = "always",
|
||||||
|
--- @type boolean Defaults to `false`
|
||||||
|
showSuggestionsAsSnippets = false,
|
||||||
|
--- @type table<string, any> [Emmet Docs](https://docs.emmet.io/customization/syntax-profiles/)
|
||||||
|
syntaxProfiles = {},
|
||||||
|
--- @type table<string, string> [Emmet Docs](https://docs.emmet.io/customization/snippets/#variables)
|
||||||
|
variables = {},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
setup = {
|
setup = {
|
||||||
eslint = function()
|
eslint = function()
|
||||||
require("lazyvim.util").on_attach(function(client)
|
require("lazyvim.util").on_attach(function(client)
|
||||||
|
@ -12,6 +51,14 @@ return {
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
end,
|
end,
|
||||||
|
|
||||||
|
tailwindcss = function(_, opts)
|
||||||
|
local tw = require("lspconfig.server_configurations.tailwindcss")
|
||||||
|
--- @param ft string
|
||||||
|
opts.filetypes = vim.tbl_filter(function(ft)
|
||||||
|
return not vim.tbl_contains(opts.filetypes_exclude or {}, ft)
|
||||||
|
end, tw.default_config.filetypes)
|
||||||
|
end,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,23 @@
|
||||||
|
local augroup = vim.api.nvim_create_augroup("LspFormatting", {})
|
||||||
|
|
||||||
return {
|
return {
|
||||||
"jose-elias-alvarez/null-ls.nvim",
|
"jose-elias-alvarez/null-ls.nvim",
|
||||||
opts = function(_, opts)
|
opts = function(_, opts)
|
||||||
local nls = require("null-ls")
|
local nls = require("null-ls")
|
||||||
table.insert(opts.sources, nls.builtins.formatting.prettierd)
|
-- table.insert(opts.sources, nls.builtins.formatting.prettierd)
|
||||||
end,
|
end,
|
||||||
|
config = {
|
||||||
|
on_attach = function(client, bufnr)
|
||||||
|
if client.supports_method("textDocument/formatting") then
|
||||||
|
vim.api.nvim_clear_autocmds({ group = augroup, buffer = bufnr })
|
||||||
|
vim.api.nvim_create_autocmd("BufWritePre", {
|
||||||
|
group = augroup,
|
||||||
|
buffer = bufnr,
|
||||||
|
callback = function()
|
||||||
|
vim.lsp.buf.format()
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
return {
|
||||||
|
"hrsh7th/nvim-cmp",
|
||||||
|
dependencies = {
|
||||||
|
{ "roobert/tailwindcss-colorizer-cmp.nvim", config = true },
|
||||||
|
},
|
||||||
|
opts = function(_, opts)
|
||||||
|
-- original LazyVim kind icon formatter
|
||||||
|
local format_kinds = opts.formatting.format
|
||||||
|
opts.formatting.format = function(entry, item)
|
||||||
|
format_kinds(entry, item) -- add icons
|
||||||
|
return require("tailwindcss-colorizer-cmp").formatter(entry, item)
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
}
|
|
@ -0,0 +1,20 @@
|
||||||
|
return {
|
||||||
|
"MunifTanjim/prettier.nvim",
|
||||||
|
config = {
|
||||||
|
bin = "prettier", -- or `'prettierd'` (v0.23.3+)
|
||||||
|
filetypes = {
|
||||||
|
"css",
|
||||||
|
"graphql",
|
||||||
|
"html",
|
||||||
|
"javascript",
|
||||||
|
"javascriptreact",
|
||||||
|
"json",
|
||||||
|
"less",
|
||||||
|
"markdown",
|
||||||
|
"scss",
|
||||||
|
"typescript",
|
||||||
|
"typescriptreact",
|
||||||
|
"yaml",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
|
@ -0,0 +1,12 @@
|
||||||
|
return {
|
||||||
|
"ahmedkhalf/project.nvim",
|
||||||
|
opts = {},
|
||||||
|
event = "VeryLazy",
|
||||||
|
config = function(_, opts)
|
||||||
|
require("project_nvim").setup(opts)
|
||||||
|
require("telescope").load_extension("projects")
|
||||||
|
end,
|
||||||
|
keys = {
|
||||||
|
{ "<leader>fp", "<Cmd>Telescope projects<CR>", desc = "Projects" },
|
||||||
|
},
|
||||||
|
}
|
|
@ -0,0 +1,4 @@
|
||||||
|
return {
|
||||||
|
"roobert/tailwindcss-colorizer-cmp.nvim",
|
||||||
|
config = true,
|
||||||
|
}
|
Loading…
Reference in New Issue