Last active
August 17, 2024 21:09
-
-
Save Victor-Fiamoncini/cc9defb2c8d22acbcfee5802e9eb2cdc to your computer and use it in GitHub Desktop.
LunarVim Settings
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- General | |
vim.log.level = "warn" | |
vim.opt["colorcolumn"] = "120" | |
vim.opt["relativenumber"] = true | |
lvim.format_on_save.enabled = true | |
lvim.format_on_save.pattern = { "*.css", "*.erb", "*.html", "*.js", | |
"*.json", "*.jsx", | |
"*.lua", | |
"*.md", | |
"*.mjs", "*.php", "*.py", "*.rb", "*.rs", "*.scss", "*.ts", "*.tsx", "*.twig" } | |
lvim.colorscheme = "material-palenight" | |
lvim.leader = "space" | |
-- Keymapping | |
lvim.keys.normal_mode["<C-s>"] = ":w<cr>" | |
-- Builtin Plugins | |
lvim.builtin.alpha.active = true | |
lvim.builtin.alpha.mode = "dashboard" | |
lvim.builtin.terminal.active = true | |
lvim.builtin.nvimtree.setup.view.side = "left" | |
lvim.builtin.nvimtree.setup.renderer.icons.show.git = false | |
lvim.builtin.nvimtree.setup.open_on_tab = true | |
lvim.builtin.nvimtree.setup.filters.dotfiles = false | |
lvim.builtin.nvimtree.setup.view.width = 55 | |
lvim.builtin.nvimtree.setup.sort_by = "case_sensitive" | |
lvim.builtin.nvimtree.setup.actions.open_file.resize_window = true | |
lvim.builtin.treesitter.highlight.enabled = true | |
lvim.builtin.treesitter.ensure_installed = { | |
"bash", | |
"javascript", | |
"json", | |
"lua", | |
"python", | |
"typescript", | |
"tsx", | |
"css", | |
"rust", | |
"twig", | |
"yaml", | |
"php", | |
"html", | |
"scss", | |
"ruby" | |
} | |
-- Formatters & Linters | |
local formatters = require "lvim.lsp.null-ls.formatters" | |
local linters = require "lvim.lsp.null-ls.linters" | |
formatters.setup { | |
{ | |
name = "prettier", | |
filetypes = { "css", "javascript", "javascriptreact", "scss", "typescript", "typescriptreact", "vue" }, | |
}, | |
{ | |
name = "black", | |
filetypes = { "python" }, | |
}, | |
{ | |
name = "htmlbeautifier", | |
filetypes = { "eruby" }, | |
}, | |
} | |
linters.setup { | |
{ | |
command = "eslint_d", | |
filetypes = { "javascript", "javascriptreact", "typescript", "typescriptreact", "vue" }, | |
}, | |
} | |
-- Additional Plugins | |
lvim.plugins = { | |
{ "marko-cerovac/material.nvim" }, | |
{ | |
"f-person/git-blame.nvim", | |
event = "BufRead", | |
config = function() | |
vim.cmd "highlight default link gitblame SpecialComment" | |
vim.g.gitblame_enabled = 1 | |
end, | |
}, | |
{ | |
'wfxr/minimap.vim', | |
build = "cargo install --locked code-minimap", | |
init = function() | |
vim.cmd("let g:minimap_width = 26") | |
vim.cmd("let g:minimap_auto_start = 1") | |
vim.cmd("let g:minimap_auto_start_win_enter = 1") | |
vim.cmd("let g:minimap_git_colors = 1") | |
end, | |
}, | |
{ | |
"karb94/neoscroll.nvim", | |
event = "WinScrolled", | |
config = function() | |
require('neoscroll').setup({ | |
mappings = { '<C-u>', '<C-d>', '<C-b>', '<C-f>', | |
'<C-y>', '<C-e>', 'zt', 'zz', 'zb' }, | |
hide_cursor = true, | |
stop_eof = true, | |
use_local_scrolloff = false, | |
respect_scrolloff = false, | |
cursor_scrolls_alone = true, | |
easing_function = nil, | |
pre_hook = nil, | |
post_hook = nil, | |
}) | |
end | |
}, | |
{ | |
"editorconfig/editorconfig-vim", | |
config = function() | |
vim.cmd("let g:EditorConfig_exec_path = '/usr/local/bin/editorconfig'") | |
vim.cmd("let g:EditorConfig_core_mode = 'external_command'") | |
end | |
}, | |
{ | |
"nacro90/numb.nvim", | |
event = "BufRead", | |
config = function() | |
require("numb").setup { | |
show_numbers = true, -- Enable 'number' for the window while peeking | |
show_cursorline = true, -- Enable 'cursorline' for the window while peeking | |
} | |
end, | |
}, | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment