current nvim-config

This commit is contained in:
2025-10-09 00:02:38 +02:00
commit 25782b6cfa
7 changed files with 195 additions and 0 deletions

85
init.lua Normal file
View File

@@ -0,0 +1,85 @@
vim.opt.tabstop = 8 -- Always 8 (see :h tabstop)
vim.opt.softtabstop = 4 -- What you expecting
vim.opt.shiftwidth = 4 -- What you expecting
vim.cmd("set rnu")
vim.g.mapleader = " "
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
"--branch=stable", -- latest stable release
lazypath,
})
end
vim.opt.rtp:prepend(lazypath)
require("lazy").setup("plugins")
vim.keymap.set('n', '<leader>n', ':Neotree filesystem reveal left<CR>', {})
--NVIM ANGULAR LSPCONFIG
--[[local project_library_path = "/usr/lib/node_modules/@angular/language-server/"
local cmd = {
"ngserver",
"--stdio",
"--tsProbeLocations",
project_library_path,
"--ngProbeLocations",
project_library_path,
"--19.2.1",
""
}
local filetypes = {
"typescript",
"html",
"ts"
}
local root_markers={
"angular.json",
"nx.json"
}
vim.lsp.config('angularls', {
cmd = cmd,
filetypes = filetypes,
root_markers = root_markers
})
vim.lsp.enable('angularls')
]]--
--NVIM-CMP
config=function()
local cmp = require'cmp'
require("luasnip.loaders.from_vscode").lazy_load()
cmp.setup({
snippet = {
-- REQUIRED - you must specify a snippet engine
expand = function(args)
require('luasnip').lsp_expand(args.body)
end,
},
window = {
completion = cmp.config.window.bordered(),
documentation = cmp.config.window.bordered(),
},
mapping = cmp.mapping.preset.insert({
['<C-b>'] = cmp.mapping.scroll_docs(-4),
['<C-f>'] = cmp.mapping.scroll_docs(4),
['<C-Space>'] = cmp.mapping.complete(),
['<C-e>'] = cmp.mapping.abort(),
['<CR>'] = cmp.mapping.confirm({ select = true }),
}),
sources = cmp.config.sources({
--{ name = 'nvim_lsp' },
{ name = 'luasnip' },
}, {
{ name = 'buffer' },
})
})
end

19
lazy-lock.json Normal file
View File

@@ -0,0 +1,19 @@
{
"LuaSnip": { "branch": "master", "commit": "73813308abc2eaeff2bc0d3f2f79270c491be9d7" },
"cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" },
"friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" },
"hererocks": { "branch": "master", "commit": "160228946bed9998f5e3b168bd0b66ba2690f8f3" },
"image.nvim": { "branch": "master", "commit": "446a8a5cc7a3eae3185ee0c697732c32a5547a0b" },
"kanagawa": { "branch": "master", "commit": "27f1e119f3a7e6d11d435a59e3262e6affda1f83" },
"lazy.nvim": { "branch": "main", "commit": "59334064f8604ca073791c25dcc5c9698865406e" },
"neo-tree.nvim": { "branch": "v3.x", "commit": "0c29e3795b9105d68390d2fdfd430409ef8c5d65" },
"nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" },
"nvim-autopairs": { "branch": "master", "commit": "23320e75953ac82e559c610bec5a90d9c6dfa743" },
"nvim-cmp": { "branch": "main", "commit": "b5311ab3ed9c846b585c0c15b7559be131ec4be9" },
"nvim-dap": { "branch": "master", "commit": "881f7dc17c0b4204a1d844732f95539575350e5b" },
"nvim-surround": { "branch": "main", "commit": "a868c256c861044beb9794b4dd126480dcdfbdad" },
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
"nvim-web-devicons": { "branch": "master", "commit": "b8221e42cf7287c4dcde81f232f58d7b947c210d" },
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
"telescope.nvim": { "branch": "master", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" }
}

47
lua/plugins.lua Normal file
View File

@@ -0,0 +1,47 @@
return{
{
"kylechui/nvim-surround",
version = "^3.0.0",
event = "VeryLazy",
config= function()
require("nvim-surround").setup({})
end
},
{
"mfussenegger/nvim-dap",
branch = 'master'
},
{
'windwp/nvim-autopairs',
event = "InsertEnter",
config = true
-- use opts = {} for passing setup options
-- this is equivalent to setup({}) function
},
{
"nvim-neo-tree/neo-tree.nvim",
branch="v3.x",
dependencies={
"nvim-lua/plenary.nvim",
"nvim-tree/nvim-web-devicons",
"MunifTanjim/nui.nvim",
"3rd/image.nvim"
}
},
--{
-- 'neovim/nvim-lspconfig'
-- },
{
'hrsh7th/nvim-cmp'
},
{
'L3MON4D3/LuaSnip',
},
{
'saadparwaiz1/cmp_luasnip'
},
{
'rafamadriz/friendly-snippets'
}
}

9
lua/plugins/kanagawa.lua Normal file
View File

@@ -0,0 +1,9 @@
return {
"rebelot/kanagawa.nvim",
lazy=false,
name = "kanagawa",
priority = 1000,
config=function()
vim.cmd.colorscheme "kanagawa"
end
}

View File

@@ -0,0 +1,8 @@
return {
"kylechui/nvim-surround",
version = "^3.0.0",
event = "VeryLazy",
config=function()
require("nvim-surround").setup({})
end
}

12
lua/plugins/telescope.lua Normal file
View File

@@ -0,0 +1,12 @@
return {
'nvim-telescope/telescope.nvim', tag = '0.1.8',
dependencies = { 'nvim-lua/plenary.nvim' },
config=function()
--telescope
local builtin = require("telescope.builtin")
vim.keymap.set('n', '<C-p>', builtin.find_files, {})
vim.keymap.set('n', '<leader>fg', builtin.live_grep, {})
vim.keymap.set('n', '<leader>fo', builtin.treesitter, {})
end
}

View File

@@ -0,0 +1,15 @@
return {
"nvim-treesitter/nvim-treesitter",
branch = 'master',
lazy = false,
build = ":TSUpdate",
config= function()
--TREESITTER
local config = require("nvim-treesitter.configs")
config.setup({
ensure_installed ={"lua", "c", "python", "cpp", "typescript", "javascript", "html", "json5"},
highlight ={enable=true},
indent ={ disable=true },
})
end
}