initial
This commit is contained in:
25
.config/nvim/init.lua
Normal file
25
.config/nvim/init.lua
Normal file
@@ -0,0 +1,25 @@
|
||||
|
||||
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)
|
||||
vim.g.mapleader = " "
|
||||
|
||||
ops = {} -- see https://github.com/folke/lazy.nvim#%EF%B8%8F-configuration
|
||||
|
||||
require("lazy").setup("plugins", opts)
|
||||
|
||||
vim.o.expandtab = true -- expand tab input with spaces characters
|
||||
vim.o.smartindent = true -- syntax aware indentations for newline inserts
|
||||
vim.o.tabstop = 4 -- num of space characters per tab
|
||||
vim.o.shiftwidth = 4 -- spaces per indentation level
|
||||
|
||||
|
||||
21
.config/nvim/lazy-lock.json
Normal file
21
.config/nvim/lazy-lock.json
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"LuaSnip": { "branch": "master", "commit": "82108e7e31cc6fc223cc5df5cae6d89f70bb199f" },
|
||||
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
|
||||
"cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" },
|
||||
"cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" },
|
||||
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
||||
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
|
||||
"friendly-snippets": { "branch": "main", "commit": "69a2c1675b66e002799f5eef803b87a12f593049" },
|
||||
"hydra.nvim": { "branch": "master", "commit": "55de54543d673824435930ecf533256eea2e565b" },
|
||||
"kanagawa.nvim": { "branch": "master", "commit": "c19b9023842697ec92caf72cd3599f7dd7be4456" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "96584866b9c5e998cbae300594d0ccfd0c464627" },
|
||||
"lsp-zero.nvim": { "branch": "v1.x", "commit": "aa36afcf7a59fbd98008c9a434593c423d3d649a" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "0989bdf4fdf7b5aa4c74131d7ffccc3f399ac788" },
|
||||
"mason.nvim": { "branch": "main", "commit": "e110bc3be1a7309617cecd77bfe4bf86ba1b8134" },
|
||||
"multicursors.nvim": { "branch": "main", "commit": "8e876fe9db46c1b76c151202b418df21eca07bad" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "538e37ba87284942c1d76ed38dd497e54e65b891" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "e47ccfae775f0d572ef0f3a7d245f043b259dafc" },
|
||||
"nvim-tree.lua": { "branch": "master", "commit": "b8c3a23e76f861d5f0ff3f6714b9b56388984d0b" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "8cd2b230174efbf7b5d9f49fe2f90bda6b5eb16e" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "db0c864375c198cacc171ff373e76bfce2a85045" }
|
||||
}
|
||||
1
.config/nvim/lua/plugins.lua
Normal file
1
.config/nvim/lua/plugins.lua
Normal file
@@ -0,0 +1 @@
|
||||
return {} -- needed
|
||||
10
.config/nvim/lua/plugins/kanagawa.lua
Normal file
10
.config/nvim/lua/plugins/kanagawa.lua
Normal file
@@ -0,0 +1,10 @@
|
||||
return {
|
||||
"rebelot/kanagawa.nvim",
|
||||
lazy = false,
|
||||
init = function()
|
||||
require("kanagawa").setup({
|
||||
theme = "dragon"
|
||||
})
|
||||
vim.cmd("colorscheme kanagawa")
|
||||
end
|
||||
};
|
||||
38
.config/nvim/lua/plugins/lua-zero.lua
Normal file
38
.config/nvim/lua/plugins/lua-zero.lua
Normal file
@@ -0,0 +1,38 @@
|
||||
return {
|
||||
'VonHeikemen/lsp-zero.nvim',
|
||||
branch = 'v1.x',
|
||||
dependencies = {
|
||||
-- LSP Support
|
||||
{'neovim/nvim-lspconfig'}, -- Required
|
||||
{'williamboman/mason.nvim'}, -- Optional
|
||||
{'williamboman/mason-lspconfig.nvim'}, -- Optional
|
||||
|
||||
-- Autocompletion
|
||||
{'hrsh7th/nvim-cmp'}, -- Required
|
||||
{'hrsh7th/cmp-nvim-lsp'}, -- Required
|
||||
{'hrsh7th/cmp-buffer'}, -- Optional
|
||||
{'hrsh7th/cmp-path'}, -- Optional
|
||||
{'saadparwaiz1/cmp_luasnip'}, -- Optional
|
||||
{'hrsh7th/cmp-nvim-lua'}, -- Optional
|
||||
|
||||
-- Snippets
|
||||
{'L3MON4D3/LuaSnip'}, -- Required
|
||||
{'rafamadriz/friendly-snippets'}, -- Optional
|
||||
},
|
||||
init = function()
|
||||
local lsp_zero = require('lsp-zero')
|
||||
|
||||
lsp_zero.on_attach(function(client, bufnr)
|
||||
-- see :help lsp-zero-keybindings
|
||||
-- to learn the available actions
|
||||
lsp_zero.default_keymaps({buffer = bufnr})
|
||||
end)
|
||||
require('mason').setup({})
|
||||
require('mason-lspconfig').setup({
|
||||
ensure_installed = {},
|
||||
handlers = {
|
||||
lsp_zero.default_setup,
|
||||
},
|
||||
})
|
||||
end
|
||||
};
|
||||
17
.config/nvim/lua/plugins/multi_cursors.lua
Normal file
17
.config/nvim/lua/plugins/multi_cursors.lua
Normal file
@@ -0,0 +1,17 @@
|
||||
return {
|
||||
"smoka7/multicursors.nvim",
|
||||
event = "VeryLazy",
|
||||
dependencies = {
|
||||
'smoka7/hydra.nvim',
|
||||
},
|
||||
opts = {},
|
||||
cmd = { 'MCstart', 'MCvisual', 'MCclear', 'MCpattern', 'MCvisualPattern', 'MCunderCursor' },
|
||||
keys = {
|
||||
{
|
||||
mode = { 'v', 'n' },
|
||||
'<Leader>m',
|
||||
'<cmd>MCstart<cr>',
|
||||
desc = 'Create a selection for selected text or word under the cursor',
|
||||
},
|
||||
},
|
||||
};
|
||||
11
.config/nvim/lua/plugins/tree.lua
Normal file
11
.config/nvim/lua/plugins/tree.lua
Normal file
@@ -0,0 +1,11 @@
|
||||
return {
|
||||
"nvim-tree/nvim-tree.lua",
|
||||
version = "*",
|
||||
lazy = false,
|
||||
dependencies = {
|
||||
"nvim-tree/nvim-web-devicons",
|
||||
},
|
||||
config = function()
|
||||
require("nvim-tree").setup({})
|
||||
end,
|
||||
};
|
||||
53
.config/nvim/lua/plugins/treesitter.lua
Normal file
53
.config/nvim/lua/plugins/treesitter.lua
Normal file
@@ -0,0 +1,53 @@
|
||||
return {
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
init=function()
|
||||
require'nvim-treesitter.configs'.setup {
|
||||
-- A list of parser names, or "all" (the five listed parsers should always be installed)
|
||||
ensure_installed = {
|
||||
"c", "lua", "vim",
|
||||
"vimdoc", "query",
|
||||
"linkerscript",
|
||||
"rust", "cpp",
|
||||
"python", "nasm",
|
||||
"javascript", "typescript"
|
||||
},
|
||||
|
||||
-- Install parsers synchronously (only applied to `ensure_installed`)
|
||||
sync_install = false,
|
||||
|
||||
-- Automatically install missing parsers when entering buffer
|
||||
-- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally
|
||||
auto_install = true,
|
||||
|
||||
-- List of parsers to ignore installing (or "all")
|
||||
ignore_install = { },
|
||||
|
||||
---- If you need to change the installation directory of the parsers (see -> Advanced Setup)
|
||||
-- parser_install_dir = "/some/path/to/store/parsers", -- Remember to run vim.opt.runtimepath:append("/some/path/to/store/parsers")!
|
||||
|
||||
highlight = {
|
||||
enable = true,
|
||||
|
||||
-- NOTE: these are the names of the parsers and not the filetype. (for example if you want to
|
||||
-- disable highlighting for the `tex` filetype, you need to include `latex` in this list as this is
|
||||
-- the name of the parser)
|
||||
-- list of language that will be disabled
|
||||
disable = { },
|
||||
-- Or use a function for more flexibility, e.g. to disable slow treesitter highlight for large files
|
||||
disable = function(lang, buf)
|
||||
local max_filesize = 100 * 1024 -- 100 KB
|
||||
local ok, stats = pcall(vim.loop.fs_stat, vim.api.nvim_buf_get_name(buf))
|
||||
if ok and stats and stats.size > max_filesize then
|
||||
return true
|
||||
end
|
||||
end,
|
||||
|
||||
-- Setting this to true will run `:h syntax` and tree-sitter at the same time.
|
||||
-- Set this to `true` if you depend on 'syntax' being enabled (like for indentation).
|
||||
-- Using this option may slow down your editor, and you may see some duplicate highlights.
|
||||
-- Instead of true it can also be a list of languages
|
||||
additional_vim_regex_highlighting = false,
|
||||
},
|
||||
}
|
||||
end
|
||||
}
|
||||
Reference in New Issue
Block a user