Refactor neovim config (#2)
Changes include: - [x] Use init.lua instead of init.vim - Some keybindings are still to be converted - [x] Use packer as a package manager instead of vim-plug - [ ] Use built-in lsp instead of coc.nvim - [x] Set up language servers - [x] Completion - [x] Formatting (previously coc-prettier, now neoformat) - [ ] Snippets - [ ] Replace fzf with telescope.nvim - [x] Implement treesitter syntax highlighting - More info: https://github.com/nvim-treesitter/nvim-treesitter Note that this requires neovim nightly until 0.5 is released Reviewed-on: #2 Co-authored-by: Marko Korhonen <marko@korhonen.cc> Co-committed-by: Marko Korhonen <marko@korhonen.cc>
This commit is contained in:
parent
b4f2b57060
commit
95a99aa1bf
24 changed files with 492 additions and 525 deletions
61
home/.config/nvim/lua/settings.lua
Normal file
61
home/.config/nvim/lua/settings.lua
Normal file
|
@ -0,0 +1,61 @@
|
|||
local o = vim.o
|
||||
local g = vim.g
|
||||
local cmd = vim.cmd
|
||||
|
||||
------ Appearance ------
|
||||
|
||||
-- Set colorscheme
|
||||
require('onedark').setup()
|
||||
|
||||
-- True colors
|
||||
o.termguicolors = true
|
||||
|
||||
-- Floating window transparency
|
||||
o.winblend = 10
|
||||
|
||||
-- Remove extra line
|
||||
o.cmdheight = 1
|
||||
|
||||
-- Always show signcolumn
|
||||
o.signcolumn = 'yes'
|
||||
|
||||
-- Blinking cursor
|
||||
cmd 'set guicursor=i:ver1'
|
||||
cmd 'set guicursor+=a:blinkon1'
|
||||
|
||||
-- Gutter and cursoline bg transparent
|
||||
cmd 'highlight CursorLineNr guibg=transparent'
|
||||
cmd 'highlight SignColumn guibg=transparent'
|
||||
|
||||
------ Misc -------
|
||||
|
||||
-- Use suda by default
|
||||
g.suda_smart_edit = 1
|
||||
|
||||
|
||||
-- Split direction
|
||||
o.splitbelow = true
|
||||
o.splitright = true
|
||||
|
||||
|
||||
-- Case insensitive search
|
||||
o.ignorecase = true
|
||||
o.smartcase = true
|
||||
|
||||
-- Use mouse
|
||||
o.mouse = 'a'
|
||||
|
||||
-- Use system clipboard
|
||||
o.clipboard = 'unnamedplus'
|
||||
|
||||
-- Autoindent and syntax higlight
|
||||
o.autoindent = true
|
||||
o.smartindent = true
|
||||
o.tabstop = 4
|
||||
o.shiftwidth = 4
|
||||
cmd 'syntax on'
|
||||
cmd 'filetype on'
|
||||
cmd 'filetype plugin indent on'
|
||||
|
||||
-- Disable auto commenting
|
||||
o.formatoptions = 'cro'
|
Loading…
Add table
Add a link
Reference in a new issue