Last active
October 15, 2024 16:45
-
-
Save Gottfr1ed/863a2ef2c815550adcd5a6f3ee0fdbea to your computer and use it in GitHub Desktop.
neovim config
This file contains hidden or 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
| -- ingore case when searching in lowercase | |
| vim.opt.hlsearch = false | |
| vim.opt.ignorecase = true | |
| vim.opt.smartcase = true | |
| -- scroll half screen | |
| vim.opt.scrolljump = -50 | |
| -- ignore case when completing file names and directories | |
| vim.opt.wildignorecase = true | |
| -- split right|below instead of left|top | |
| vim.opt.splitright = true | |
| vim.opt.splitbelow = true | |
| -- 4 spaces, autoindent | |
| --vim.opt.smartindent = true | |
| vim.opt.cindent = true | |
| --vim.opt.cinoptions = {"l1", "(s", "m1"} | |
| --vim.opt.cinoptions = {"(0", "W4", ":0"} | |
| vim.opt.cinoptions = {"(0", "="} | |
| vim.opt.expandtab = true | |
| vim.opt.tabstop = 4 vim.opt.shiftwidth = 4 | |
| -- ru layout | |
| vim.opt.langmap = "ФИСВУАПРШОЛДЬТЩЗЙКЫЕГМЦЧНЯ;ABCDEFGHIJKLMNOPQRSTUVWXYZ,фисвуапршолдьтщзйкыегмцчня;abcdefghijklmnopqrstuvwxyz" | |
| -- globals | |
| vim.g.html_indent_inctags = "p" | |
| -- colorscheme | |
| vim.cmd([[colorscheme habamax]]) | |
| -- lazy | |
| local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" | |
| if not (vim.uv or vim.loop).fs_stat(lazypath) then | |
| local lazyrepo = "https://github.com/folke/lazy.nvim.git" | |
| local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) | |
| if vim.v.shell_error ~= 0 then | |
| vim.api.nvim_echo({ | |
| { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, | |
| { out, "WarningMsg" }, | |
| { "\nPress any key to exit..." }, | |
| }, true, {}) | |
| vim.fn.getchar() | |
| os.exit(1) | |
| end | |
| end | |
| vim.opt.rtp:prepend(lazypath) | |
| vim.g.mapleader = " " | |
| vim.g.maplocalleader = "\\" | |
| require("lazy").setup({ | |
| spec = { | |
| -- treesitter | |
| { | |
| "nvim-treesitter/nvim-treesitter", | |
| build = ":TSUpdate", | |
| config = function() | |
| require("nvim-treesitter.configs").setup { | |
| ensure_installed = { | |
| "vim", | |
| "vimdoc", | |
| "lua", | |
| "bash", | |
| "c", | |
| "cpp", | |
| "go", | |
| "zig", | |
| "python", | |
| "html", | |
| "css", | |
| "javascript", | |
| }, | |
| highlight = { | |
| enable = true, | |
| }, | |
| } | |
| end, | |
| }, | |
| -- telescope | |
| { | |
| "nvim-telescope/telescope.nvim", | |
| dependencies = { | |
| "nvim-lua/plenary.nvim", | |
| }, | |
| config = function() | |
| require("telescope").setup { | |
| pickers = { | |
| buffers = { | |
| initial_mode = "normal", | |
| }, | |
| }, | |
| } | |
| local builtin = require('telescope.builtin') | |
| vim.keymap.set('n', '<leader>ff', builtin.find_files, {}) | |
| vim.keymap.set('n', '<leader>fg', builtin.live_grep, {}) | |
| vim.keymap.set('n', '<leader>fb', builtin.buffers, {}) | |
| vim.keymap.set('n', '<leader>fh', builtin.help_tags, {}) | |
| end, | |
| }, | |
| -- theme | |
| { | |
| "sainnhe/edge" | |
| }, | |
| -- lspconfig | |
| { | |
| "neovim/nvim-lspconfig", | |
| config = function() | |
| local lspconfig = require('lspconfig') | |
| end, | |
| }, | |
| }, | |
| install = { | |
| colorscheme = { "habamax" }, | |
| }, | |
| checker = { | |
| enabled = false, | |
| }, | |
| }) | |
| vim.opt.background = "light" | |
| vim.cmd [[ colorscheme habamax ]] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment