vim.opt.syntax = 'on' vim.cmd("filetype plugin indent on") vim.opt.number = true -- set relativenumber vim.opt.relativenumber = false --vim.opt.path += "**" vim.opt.swapfile = false vim.opt.wildmenu = true vim.opt.backspace = "indent,eol,start" vim.opt.undodir = "/home/ateijelo/.cache/nvim/undo" vim.opt.undofile = true vim.opt.incsearch = true vim.opt.smartindent = true vim.opt.ic = true -- set colorcolumn=88 vim.opt.et = true vim.opt.ts = 4 vim.opt.sw = 4 --set showmatch vim.opt.hlsearch = true --incsearch vim.cmd("highlight ColorColumn ctermbg=9") vim.cmd("autocmd FileType yaml,yaml.ansible setlocal indentkeys-=0#") -- don't use NeoVim's thin cursor vim.opt.guicursor = "" require("colorschemes") vim.cmd("hi MatchParen cterm=bold,underline gui=bold,underline") vim.api.nvim_set_keymap("n", "", "", { noremap = true }) vim.g.mapleader = " " for _, mode in ipairs({"n", "i"}) do vim.api.nvim_set_keymap(mode, "", "g", { noremap = true }) vim.api.nvim_set_keymap(mode, "", "g", { noremap = true }) vim.api.nvim_set_keymap(mode, "", "", { noremap = true }) vim.api.nvim_set_keymap(mode, "", "", { noremap = true }) vim.api.nvim_set_keymap(mode, "", "", { noremap = true }) vim.api.nvim_set_keymap(mode, "", "", { noremap = true }) end vim.api.nvim_set_keymap("n", "o", "lua vim.diagnostic.open_float()", { noremap = true }) vim.api.nvim_set_keymap("n", "", "lua vim.diagnostic.open_float()", { noremap = true }) vim.api.nvim_set_keymap("n", "i", "lua vim.lsp.buf.code_action()", { noremap = true }) vim.api.nvim_set_keymap("n", "", "lua vim.lsp.buf.code_action()", { noremap = true }) require('plugins') -- require'lspconfig'.pyright.setup{} local nvim_lsp = require'lspconfig' nvim_lsp.pyright.setup{} -- local on_attach = function(client) -- require'completion'.on_attach(client) -- end -- require('snippy').setup({ -- mappings = { -- is = { -- [''] = 'expand_or_advance', -- [''] = 'previous', -- }, -- nx = { -- ['x'] = 'cut_text', -- }, -- }, -- }) require('completion') local capabilities = require('cmp_nvim_lsp').update_capabilities(vim.lsp.protocol.make_client_capabilities()) nvim_lsp.rust_analyzer.setup({ capabilities = capabilities, settings = { ["rust-analyzer"] = { } } }) vim.diagnostic.config({ underline = true, signs = true, virtual_text = true, float = { show_header = true, source = 'if_many', border = 'rounded', focusable = false, } }) require('treesitter') -- -- trouble.nvim mappings -- vim.api.nvim_set_keymap("n", "xx", "Trouble", -- {silent = true, noremap = true} -- ) -- vim.api.nvim_set_keymap("n", "xw", "Trouble workspace_diagnostics", -- {silent = true, noremap = true} -- ) -- vim.api.nvim_set_keymap("n", "xd", "Trouble document_diagnostics", -- {silent = true, noremap = true} -- ) -- vim.api.nvim_set_keymap("n", "xl", "Trouble loclist", -- {silent = true, noremap = true} -- ) -- vim.api.nvim_set_keymap("n", "xq", "Trouble quickfix", -- {silent = true, noremap = true} -- ) -- vim.api.nvim_set_keymap("n", "gR", "Trouble lsp_references", -- {silent = true, noremap = true} -- ) -- -- original init.vim -- syntax on -- hi MatchParen ctermfg=none ctermbg=none cterm=bold,underline gui=bold,underline guifg=fg guibg=bg -- -- filetype plugin indent on -- set number -- "set relativenumber -- set path+=** -- set noswapfile -- set wildmenu -- set backspace=indent,eol,start -- set undodir=~/.cache/nvim/undo -- set undofile -- set incsearch -- set smartindent -- set ic -- "set colorcolumn=88 -- set et -- set ts=4 -- set sw=4 -- "set showmatch -- set hlsearch incsearch -- "highlight ColorColumn ctermbg=9 -- -- lua require('plugins')