mirror of
https://github.com/srid/nixos-config.git
synced 2026-01-10 02:02:36 +08:00
nvim: add lua config
This commit is contained in:
parent
3eac602e95
commit
0c2e6d67a7
2 changed files with 18 additions and 12 deletions
9
home/neovim.lua
Normal file
9
home/neovim.lua
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
-- lualine setup
|
||||
require('lualine').setup {
|
||||
options = {
|
||||
theme = 'tokyonight'
|
||||
}
|
||||
}
|
||||
|
||||
-- bufferline setup
|
||||
require("bufferline").setup{ }
|
||||
|
|
@ -41,6 +41,7 @@
|
|||
nvim-treesitter
|
||||
tokyonight-nvim
|
||||
|
||||
# Doom-emacs like experience
|
||||
telescope-nvim
|
||||
telescope-zoxide
|
||||
vim-which-key
|
||||
|
|
@ -48,6 +49,7 @@
|
|||
# Buffer tabs
|
||||
bufferline-nvim
|
||||
|
||||
# Developing plugins in Haskell
|
||||
nvim-hs-vim
|
||||
|
||||
# Language support
|
||||
|
|
@ -56,13 +58,14 @@
|
|||
vim-markdown
|
||||
];
|
||||
|
||||
# Note: Lua based config is in ./neovim.lua
|
||||
extraConfig = ''
|
||||
set nobackup
|
||||
set termguicolors " 24-bit colors
|
||||
" let g:tokyonight_style = "day"
|
||||
let g:tokyonight_italic_functions = 1
|
||||
colorscheme tokyonight
|
||||
" Use spave instead of \ as leader key, like doom-emacs
|
||||
" Use space instead of \ as leader key, like doom-emacs
|
||||
map <Space> <Leader>
|
||||
|
||||
" which-key
|
||||
|
|
@ -77,19 +80,13 @@
|
|||
nnoremap <leader>fb <cmd>Telescope buffers<cr>
|
||||
nnoremap <leader>fh <cmd>Telescope help_tags<cr>
|
||||
|
||||
" lualine
|
||||
lua << END
|
||||
require('lualine').setup {
|
||||
options = {
|
||||
theme = 'tokyonight'
|
||||
}
|
||||
}
|
||||
END
|
||||
|
||||
lua << EOF
|
||||
${builtins.readFile ./neovim.lua}
|
||||
EOF
|
||||
|
||||
" bufferline
|
||||
lua << EOF
|
||||
require("bufferline").setup{}
|
||||
EOF
|
||||
" TODO: Move these to lua
|
||||
nnoremap <silent>[b :BufferLineCycleNext<CR>
|
||||
nnoremap <silent>b] :BufferLineCyclePrev<CR>
|
||||
nnoremap <silent>be :BufferLineSortByExtension<CR>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue