-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit.lua
More file actions
79 lines (72 loc) · 2.4 KB
/
init.lua
File metadata and controls
79 lines (72 loc) · 2.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
-- init.lua @ricalbr
-- set <space> as the leader key
vim.keymap.set({ 'n', 'v' }, '<Space>', '<Nop>', { silent = true })
vim.g.mapleader = ' '
vim.g.maplocalleader = ' '
-- general
vim.o.clipboard = "unnamedplus" -- install wl-clipboard
vim.o.undofile = true
vim.o.mouse = 'a'
vim.o.winborder = 'rounded'
vim.o.cursorline = true
vim.o.ignorecase = true
vim.o.shiftwidth = 4
vim.o.tabstop = 4
vim.o.smartindent = true
vim.o.number = true
vim.o.relativenumber = true
vim.o.termguicolors = true
vim.o.signcolumn = 'yes'
vim.o.pumheight = 10
vim.o.completeopt = 'menu,popup,fuzzy,noinsert'
-- plugins
vim.pack.add({
{ src = 'https://github.com/stevearc/oil.nvim' },
{ src = 'https://github.com/echasnovski/mini.nvim' },
{ src = 'https://github.com/ibhagwan/fzf-lua' },
{ src = "https://github.com/nvim-treesitter/nvim-treesitter", version = "master" },
{ src = 'https://github.com/neovim/nvim-lspconfig' },
{ src = 'https://github.com/mason-org/mason.nvim' },
{ src = "https://github.com/Saghen/blink.cmp", version = "v1.6.0" },
{ src = 'https://github.com/rafamadriz/friendly-snippets' },
{ src = 'https://github.com/junegunn/goyo.vim' },
{ src = 'https://github.com/catppuccin/nvim' }
})
require 'mason'.setup()
require 'fzf-lua'.setup()
require 'plugins.mini'
require 'plugins.oil'
require("catppuccin").setup({ transparent_background = true, })
vim.cmd.colorscheme "catppuccin"
-- keymaps and autocmds
require 'keymaps'
require 'autocmd'
-- blink
vim.lsp.enable({ 'lua_ls', 'clangd', 'pyright' })
require("blink.cmp").setup({
{
keymap = { preset = 'default' },
appearance = { nerd_font_variant = 'mono' },
completion = { documentation = { auto_show = false } },
sources = { default = { 'lsp', 'path', 'snippets', 'buffer' } },
fuzzy = { implementation = "rust_prefered" }
},
opts_extend = { "sources.default" }
})
-- treesitter
require('nvim-treesitter.configs').setup({
ensure_installed = { 'lua', 'python', 'c', 'cpp', 'typst' },
highlight = { enable = true },
indent = { enable = true },
incremental_selection = {
enable = true,
keymaps = {
init_selection = '<C-space>',
node_incremental = '<C-space>',
scope_incremental = false,
node_decremental = '<bs>',
},
},
})
vim.wo.foldmethod = 'expr'
vim.wo.foldexpr = 'v:lua.vim.treesitter.foldexpr()'