mirror of
https://github.com/ksyasuda/rice.git
synced 2024-10-28 09:04:10 -07:00
update nvim config
This commit is contained in:
parent
758fc2fe3f
commit
7eafb32215
@ -30,7 +30,7 @@ set showmatch
|
|||||||
set list
|
set list
|
||||||
set listchars=tab:\ ,trail:
|
set listchars=tab:\ ,trail:
|
||||||
" set path from current directory and all directories under
|
" set path from current directory and all directories under
|
||||||
set path=$PWD/**
|
" set path=$PWD/**
|
||||||
set encoding=UTF-8
|
set encoding=UTF-8
|
||||||
set guifont=FiraCode\ Nerd\ Font\ 18
|
set guifont=FiraCode\ Nerd\ Font\ 18
|
||||||
set expandtab
|
set expandtab
|
||||||
@ -78,6 +78,7 @@ let g:maplocalleader = ','
|
|||||||
if has('nvim')
|
if has('nvim')
|
||||||
Plug 'nvim-lua/plenary.nvim'
|
Plug 'nvim-lua/plenary.nvim'
|
||||||
Plug 'nvim-lua/popup.nvim'
|
Plug 'nvim-lua/popup.nvim'
|
||||||
|
Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
|
||||||
" Plug 'nvim-telescope/telescope.nvim'
|
" Plug 'nvim-telescope/telescope.nvim'
|
||||||
|
|
||||||
" Plug 'TimUntersberger/neogit'
|
" Plug 'TimUntersberger/neogit'
|
||||||
@ -91,7 +92,6 @@ if has('nvim')
|
|||||||
Plug 'lewis6991/gitsigns.nvim'
|
Plug 'lewis6991/gitsigns.nvim'
|
||||||
Plug 'lewis6991/gitsigns.nvim'
|
Plug 'lewis6991/gitsigns.nvim'
|
||||||
Plug 'nvim-lualine/lualine.nvim'
|
Plug 'nvim-lualine/lualine.nvim'
|
||||||
Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
|
|
||||||
Plug 'ojroques/nvim-lspfuzzy'
|
Plug 'ojroques/nvim-lspfuzzy'
|
||||||
|
|
||||||
Plug 'L3MON4D3/LuaSnip'
|
Plug 'L3MON4D3/LuaSnip'
|
||||||
@ -139,6 +139,7 @@ if has('nvim')
|
|||||||
let g:fzf_command = 'fzf --height 90% --width=85% --layout=reverse --preview "bat --color=always {}"'
|
let g:fzf_command = 'fzf --height 90% --width=85% --layout=reverse --preview "bat --color=always {}"'
|
||||||
source ~/.config/nvim/keybindings.vim
|
source ~/.config/nvim/keybindings.vim
|
||||||
|
|
||||||
|
" nvim plugins
|
||||||
source ~/.config/nvim/plugin-confs/bufferline.lua
|
source ~/.config/nvim/plugin-confs/bufferline.lua
|
||||||
source ~/.config/nvim/plugin-confs/dashboard-art.vim
|
source ~/.config/nvim/plugin-confs/dashboard-art.vim
|
||||||
source ~/.config/nvim/plugin-confs/dashboard-nvim.lua
|
source ~/.config/nvim/plugin-confs/dashboard-nvim.lua
|
||||||
@ -163,6 +164,7 @@ if has('nvim')
|
|||||||
source ~/.config/nvim/plugin-confs/symbols-outline.lua
|
source ~/.config/nvim/plugin-confs/symbols-outline.lua
|
||||||
source ~/.config/nvim/plugin-confs/trouble.lua
|
source ~/.config/nvim/plugin-confs/trouble.lua
|
||||||
|
|
||||||
|
" nvim and vim plugins
|
||||||
source ~/.vim/plugin-confs/floaterm.vim
|
source ~/.vim/plugin-confs/floaterm.vim
|
||||||
source ~/.vim/plugin-confs/fzf.vim
|
source ~/.vim/plugin-confs/fzf.vim
|
||||||
source ~/.vim/plugin-confs/lightline.vim
|
source ~/.vim/plugin-confs/lightline.vim
|
||||||
|
@ -93,7 +93,7 @@ nmap <leader>ob :FloatermNew --title=bpytop --opener=vsplit bpytop<CR>
|
|||||||
nmap <leader>od :FloatermNew --title=lazydocker --opener=vsplit lazydocker<CR>
|
nmap <leader>od :FloatermNew --title=lazydocker --opener=vsplit lazydocker<CR>
|
||||||
nmap <leader>on :FloatermNew --title=ncmpcpp --opener=vsplit ncmpcpp<CR>
|
nmap <leader>on :FloatermNew --title=ncmpcpp --opener=vsplit ncmpcpp<CR>
|
||||||
nmap <leader>or :FloatermNew --title=ranger --opener=vsplit ranger --cmd="cd $PWD"<CR>
|
nmap <leader>or :FloatermNew --title=ranger --opener=vsplit ranger --cmd="cd $PWD"<CR>
|
||||||
nmap <leader>ot :FloatermNew --title=floaterm --name=vsplit-term --wintype=vsplit --position=botright --width=0.5<CR>
|
nmap <leader>ot :FloatermNew --title=floaterm --name=vsplit-term --opener=edit --wintype=vsplit --position=botright --width=0.5<CR>
|
||||||
|
|
||||||
nmap <leader>r :NvimTreeRefresh<CR>
|
nmap <leader>r :NvimTreeRefresh<CR>
|
||||||
|
|
||||||
|
@ -176,7 +176,7 @@ end)
|
|||||||
|
|
||||||
-- Use a loop to conveniently call 'setup' on multiple servers and
|
-- Use a loop to conveniently call 'setup' on multiple servers and
|
||||||
-- map buffer local keybindings when the language server attaches
|
-- map buffer local keybindings when the language server attaches
|
||||||
local servers = { 'pyright', 'bashls', 'sqls', 'vimls', 'yamlls', 'dockerls', 'html', 'sumneko_lua', 'jsonls', 'dotls', 'rust_analyzer', 'clangd' }
|
local servers = { 'pyright', 'bashls', 'vimls', 'yamlls', 'dockerls', 'html', 'sumneko_lua', 'dotls', 'rust_analyzer', 'clangd' }
|
||||||
for _, lsp in pairs(servers) do
|
for _, lsp in pairs(servers) do
|
||||||
require('lspconfig')[lsp].setup {
|
require('lspconfig')[lsp].setup {
|
||||||
on_attach = on_attach,
|
on_attach = on_attach,
|
||||||
|
@ -5,27 +5,28 @@ require('lualine').setup {
|
|||||||
-- theme = 'dracula',
|
-- theme = 'dracula',
|
||||||
-- theme = 'horizon',
|
-- theme = 'horizon',
|
||||||
-- theme = 'onedark',
|
-- theme = 'onedark',
|
||||||
component_separators = { left = '', right = ''},
|
component_separators = { left = '', right = '' },
|
||||||
section_separators = { left = '', right = ''},
|
section_separators = { left = '', right = ''},
|
||||||
|
-- section_separators = { left = '', right = '' },
|
||||||
disabled_filetypes = {},
|
disabled_filetypes = {},
|
||||||
always_divide_middle = true,
|
always_divide_middle = true,
|
||||||
},
|
},
|
||||||
sections = {
|
sections = {
|
||||||
lualine_a = { 'mode' },
|
lualine_a = { 'mode' },
|
||||||
lualine_b = {'branch', 'diff'},
|
lualine_b = { 'branch', 'diff' },
|
||||||
lualine_c = {'filename'},
|
lualine_c = { 'filename' },
|
||||||
lualine_x = {
|
lualine_x = {
|
||||||
{
|
{
|
||||||
'diagnostics',
|
'diagnostics',
|
||||||
'fileformat',
|
'fileformat',
|
||||||
symbols = {
|
symbols = {
|
||||||
unix = '', -- e712
|
unix = '', -- e712
|
||||||
dos = '', -- e70f
|
dos = '', -- e70f
|
||||||
mac = '', -- e711
|
mac = '', -- e711
|
||||||
}
|
}
|
||||||
}, 'encoding', 'fileformat', {'filetype', colored=true, icon_only=false}},
|
}, 'encoding', 'fileformat', { 'filetype', colored = true, icon_only = false } },
|
||||||
lualine_y = {'progress'},
|
lualine_y = { 'progress' },
|
||||||
lualine_z = {'location'}
|
lualine_z = { 'location' }
|
||||||
},
|
},
|
||||||
inactive_sections = {
|
inactive_sections = {
|
||||||
lualine_a = {},
|
lualine_a = {},
|
||||||
@ -33,20 +34,20 @@ require('lualine').setup {
|
|||||||
lualine_c = {
|
lualine_c = {
|
||||||
{
|
{
|
||||||
'filename',
|
'filename',
|
||||||
file_status = true, -- Displays file status (readonly status, modified status)
|
file_status = true, -- Displays file status (readonly status, modified status)
|
||||||
path = 0, -- 0: Just the filename
|
path = 0, -- 0: Just the filename
|
||||||
shorting_target = 40, -- Shortens path to leave 40 spaces in the window
|
shorting_target = 40, -- Shortens path to leave 40 spaces in the window
|
||||||
symbols = {
|
symbols = {
|
||||||
modified = '[+]', -- Text to show when the file is modified.
|
modified = '[+]', -- Text to show when the file is modified.
|
||||||
readonly = '[-]', -- Text to show when the file is non-modifiable or readonly.
|
readonly = '[-]', -- Text to show when the file is non-modifiable or readonly.
|
||||||
unnamed = '[No Name]', -- Text to show for unnamed buffers.
|
unnamed = '[No Name]', -- Text to show for unnamed buffers.
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
lualine_x = {'location'},
|
lualine_x = { 'location' },
|
||||||
lualine_y = {},
|
lualine_y = {},
|
||||||
lualine_z = {}
|
lualine_z = {}
|
||||||
},
|
},
|
||||||
tabline = {},
|
tabline = {},
|
||||||
extensions = {'quickfix', 'fzf', 'nvim-tree', 'symbols-outline', 'fugitive'}
|
extensions = { 'quickfix', 'fzf', 'nvim-tree', 'symbols-outline', 'fugitive' }
|
||||||
}
|
}
|
||||||
|
@ -20,7 +20,7 @@ require("null-ls").setup({
|
|||||||
require("null-ls").builtins.diagnostics.cppcheck,
|
require("null-ls").builtins.diagnostics.cppcheck,
|
||||||
require("null-ls").builtins.diagnostics.gitlint,
|
require("null-ls").builtins.diagnostics.gitlint,
|
||||||
require("null-ls").builtins.diagnostics.jsonlint,
|
require("null-ls").builtins.diagnostics.jsonlint,
|
||||||
require("null-ls").builtins.diagnostics.luacheck,
|
-- require("null-ls").builtins.diagnostics.luacheck,
|
||||||
require("null-ls").builtins.diagnostics.markdownlint,
|
require("null-ls").builtins.diagnostics.markdownlint,
|
||||||
require("null-ls").builtins.diagnostics.pylint,
|
require("null-ls").builtins.diagnostics.pylint,
|
||||||
require("null-ls").builtins.diagnostics.pydocstyle.with({
|
require("null-ls").builtins.diagnostics.pydocstyle.with({
|
||||||
@ -28,13 +28,14 @@ require("null-ls").setup({
|
|||||||
}),
|
}),
|
||||||
require("null-ls").builtins.diagnostics.vint,
|
require("null-ls").builtins.diagnostics.vint,
|
||||||
require("null-ls").builtins.formatting.json_tool,
|
require("null-ls").builtins.formatting.json_tool,
|
||||||
require("null-ls").builtins.formatting.lua_format,
|
-- require("null-ls").builtins.formatting.lua_format,
|
||||||
require("null-ls").builtins.formatting.markdownlint,
|
require("null-ls").builtins.formatting.markdownlint,
|
||||||
require("null-ls").builtins.formatting.prettier,
|
require("null-ls").builtins.formatting.prettier,
|
||||||
require("null-ls").builtins.formatting.rustfmt,
|
-- handled by lsp server
|
||||||
|
-- require("null-ls").builtins.formatting.rustfmt,
|
||||||
require("null-ls").builtins.formatting.shfmt.with({
|
require("null-ls").builtins.formatting.shfmt.with({
|
||||||
filetypes = {"sh", "bash"},
|
filetypes = {"sh", "bash"},
|
||||||
extra_args = { "-i", "4", "-ci", "-sr" }
|
extra_args = { "-i", "0", "-ci", "-sr" }
|
||||||
}),
|
}),
|
||||||
require("null-ls").builtins.diagnostics.shellcheck.with({
|
require("null-ls").builtins.diagnostics.shellcheck.with({
|
||||||
extra_args = { "-s", "bash", "-o", "check-extra-masked-returns, check-set-e-suppressed, check-unassigned-uppercase, deprecate-which, quote-safe-variables" }
|
extra_args = { "-s", "bash", "-o", "check-extra-masked-returns, check-set-e-suppressed, check-unassigned-uppercase, deprecate-which, quote-safe-variables" }
|
||||||
|
@ -20,8 +20,8 @@ onedarkpro.setup({
|
|||||||
styles = {
|
styles = {
|
||||||
comments = "italic",
|
comments = "italic",
|
||||||
functions = "bold",
|
functions = "bold",
|
||||||
keywords = "bold,italic",
|
keywords = "italic,bold",
|
||||||
strings = "italic",
|
strings = "NONE",
|
||||||
variables = "bold"
|
variables = "bold"
|
||||||
},
|
},
|
||||||
options = {
|
options = {
|
||||||
|
Loading…
Reference in New Issue
Block a user