feat: rewrite of nvim dotfiles
This commit is contained in:
67
.config/nvim/lua/plugins/lsp.lua
Normal file
67
.config/nvim/lua/plugins/lsp.lua
Normal file
@@ -0,0 +1,67 @@
|
||||
return {
|
||||
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
},
|
||||
{
|
||||
"mason-org/mason.nvim",
|
||||
opts = {
|
||||
ui = {
|
||||
icons = {
|
||||
package_installed = "✓",
|
||||
package_pending = "➜",
|
||||
package_uninstalled = "✗"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
opts = {
|
||||
ensure_installed = { "clangd" },
|
||||
},
|
||||
dependencies = {
|
||||
{ "mason-org/mason.nvim", opts = {} },
|
||||
"neovim/nvim-lspconfig",
|
||||
},
|
||||
},
|
||||
{
|
||||
'hrsh7th/nvim-cmp',
|
||||
opts = {
|
||||
sources = {
|
||||
{ name = 'nvim_lsp' },
|
||||
{ name = 'buffer' },
|
||||
{ name = 'path' },
|
||||
}
|
||||
},
|
||||
dependencies = {
|
||||
{'L3MON4D3/LuaSnip'},
|
||||
{'hrsh7th/cmp-buffer'},
|
||||
{'hrsh7th/cmp-nvim-lsp'},
|
||||
{'saadparwaiz1/cmp_luasnip'},
|
||||
},
|
||||
},
|
||||
{
|
||||
'stevearc/conform.nvim',
|
||||
opts = {
|
||||
-- Define your formatters
|
||||
formatters_by_ft = {
|
||||
cpp = { "clang-format" },
|
||||
},
|
||||
-- Set default options
|
||||
default_format_opts = {
|
||||
lsp_format = "fallback",
|
||||
},
|
||||
-- Set up format-on-save
|
||||
format_on_save = { timeout_ms = 500 },
|
||||
-- Customize formatters
|
||||
formatters = {
|
||||
['clang-format'] = {
|
||||
append_args = function(self, ctx)
|
||||
return { "-style={IndentWidth: 4}" }
|
||||
end,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
17
.config/nvim/lua/plugins/rose-pine.lua
Normal file
17
.config/nvim/lua/plugins/rose-pine.lua
Normal file
@@ -0,0 +1,17 @@
|
||||
return {
|
||||
"rose-pine/neovim",
|
||||
name = "rose-pine",
|
||||
|
||||
config = function()
|
||||
local configs = require("rose-pine");
|
||||
|
||||
configs.setup({
|
||||
variant = "moon",
|
||||
styles = {
|
||||
transparency = true;
|
||||
}
|
||||
})
|
||||
|
||||
vim.cmd("colorscheme rose-pine")
|
||||
end
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
|
||||
return {
|
||||
"tiagovla/tokyodark.nvim",
|
||||
lazy = false,
|
||||
priority = 1000,
|
||||
config = function()
|
||||
vim.cmd("colorscheme tokyodark")
|
||||
end,
|
||||
}
|
||||
20
.config/nvim/lua/plugins/treesitter.lua
Normal file
20
.config/nvim/lua/plugins/treesitter.lua
Normal file
@@ -0,0 +1,20 @@
|
||||
return{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
build = ":TSUpdate",
|
||||
dependencies = {
|
||||
-- Automatically install LSPs and related tools to stdpath for Neovim
|
||||
"williamboman/mason.nvim",
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
},
|
||||
config = function ()
|
||||
|
||||
local configs = require("nvim-treesitter.configs")
|
||||
|
||||
configs.setup({
|
||||
ensure_installed = { "c", "cpp", "lua", "vim", "vimdoc", "query", "elixir", "heex", "javascript", "html" },
|
||||
sync_install = false,
|
||||
highlight = { enable = true },
|
||||
indent = { enable = true },
|
||||
})
|
||||
end
|
||||
}
|
||||
Reference in New Issue
Block a user