feat: rewrite of nvim dotfiles
This commit is contained in:
@@ -1 +1,19 @@
|
|||||||
|
-- Basic settings
|
||||||
|
vim.o.number = true -- Enable line numbers
|
||||||
|
vim.o.relativenumber = true -- Enable relative line numbers
|
||||||
|
vim.o.tabstop = 4 -- Number of spaces a tab represents
|
||||||
|
vim.o.shiftwidth = 4 -- Number of spaces for each indentation
|
||||||
|
vim.o.expandtab = true -- Convert tabs to spaces
|
||||||
|
vim.o.smartindent = true -- Automatically indent new lines
|
||||||
|
vim.o.wrap = false -- Disable line wrapping
|
||||||
|
vim.o.cursorline = true -- Highlight the current line
|
||||||
|
vim.o.termguicolors = true -- Enable 24-bit RGB colors
|
||||||
|
vim.o.clipboard = "unnamedplus"
|
||||||
|
|
||||||
|
-- Syntax highlighting and filetype plugins
|
||||||
|
vim.cmd('syntax enable')
|
||||||
|
vim.cmd('filetype plugin indent on')
|
||||||
|
|
||||||
require("config.lazy")
|
require("config.lazy")
|
||||||
|
|
||||||
|
--vim.cmd[[colorscheme tokyonight]]
|
||||||
|
|||||||
@@ -27,9 +27,9 @@ require("lazy").setup({
|
|||||||
-- import your plugins
|
-- import your plugins
|
||||||
{ import = "plugins" },
|
{ import = "plugins" },
|
||||||
},
|
},
|
||||||
-- Configure any other settings here. See the documentation for more details.
|
-- Configure any other settings here. See the documentation for more details.
|
||||||
-- colorscheme that will be used when installing plugins.
|
-- colorscheme that will be used when installing plugins.
|
||||||
install = { colorscheme = { "habamax" } },
|
install = { colorscheme = {"tokyonight", "habamax" } },
|
||||||
-- automatically check for plugin updates
|
-- automatically check for plugin updates
|
||||||
checker = { enabled = true },
|
checker = { enabled = true },
|
||||||
})
|
})
|
||||||
|
|||||||
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