Browse Source

small tweaks

pull/14/head
Leslie Kerman 2 years ago
parent
commit
f5af630a9d
  1. 2
      init.vim
  2. 2
      lua/configs/autocomplete.lua
  3. 179
      lua/configs/symbols_outline.lua
  4. 17
      lua/core/gui.lua
  5. 34
      lua/core/init.lua
  6. 4
      lua/core/keymaps.lua
  7. 11
      lua/core/theme.lua

2
init.vim

@ -8,7 +8,7 @@ endif
if exists("g:neovide") if exists("g:neovide")
" Neovide config " Neovide config
let g:neovide_refresh_rate=30 " come on it's just a text editor let g:neovide_refresh_rate=24 " come on it's just a text editor
let g:neovide_transparency=1.0 let g:neovide_transparency=1.0
let g:neovide_scroll_animation_length = 0.3 let g:neovide_scroll_animation_length = 0.3
let g:neovide_remember_window_size = v:true let g:neovide_remember_window_size = v:true

2
lua/configs/autocomplete.lua

@ -105,7 +105,7 @@ function M.config()
-- List of all pre-configured LSP servers: -- List of all pre-configured LSP servers:
-- github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md -- github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md
require 'lspconfig'.gopls.setup {} require 'lspconfig'.gopls.setup {}
local servers = { 'ccls', 'rust_analyzer', 'pylsp', 'sumneko_lua' } local servers = { 'clangd', 'rust_analyzer', 'pylsp', 'sumneko_lua' }
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

179
lua/configs/symbols_outline.lua

@ -1,94 +1,95 @@
local M = {} local M = {}
function M.config() function M.config()
require("symbols-outline").setup { require('symbols-outline').setup()
highlight_hovered_item = true, --require("symbols-outline").setup {
show_guides = true, -- highlight_hovered_item = true,
auto_preview = true, -- show_guides = true,
position = 'right', -- auto_preview = true,
relative_width = true, -- position = 'right',
width = 20, -- relative_width = true,
auto_close = false, -- width = 20,
show_numbers = false, -- auto_close = false,
show_relative_numbers = false, -- show_numbers = false,
show_symbol_details = true, -- show_relative_numbers = false,
preview_bg_highlight = 'Pmenu', -- show_symbol_details = true,
autofold_depth = nil, -- preview_bg_highlight = 'Pmenu',
auto_unfold_hover = true, -- autofold_depth = nil,
fold_markers = { '', '' }, -- auto_unfold_hover = true,
keymaps = { -- These keymaps can be a string or a table for multiple keys -- fold_markers = { '', '' },
close = { "<Esc>", "q" }, -- keymaps = { -- These keymaps can be a string or a table for multiple keys
goto_location = "<Cr>", -- close = { "<Esc>", "q" },
focus_location = "o", -- goto_location = "<Cr>",
hover_symbol = "<C-space>", -- focus_location = "o",
toggle_preview = "K", -- hover_symbol = "<C-space>",
rename_symbol = "r", -- toggle_preview = "K",
code_actions = { "<f12>", "a" }, -- rename_symbol = "r",
fold = "h", -- code_actions = { "<f12>", "a" },
unfold = "l", -- fold = "h",
fold_all = "H", -- unfold = "l",
unfold_all = "L", -- fold_all = "H",
fold_reset = "R", -- unfold_all = "L",
}, -- fold_reset = "R",
lsp_blacklist = {}, -- },
symbol_blacklist = {}, -- lsp_blacklist = {},
--String xxx ctermfg=107 guifg=#a0c980 -- symbol_blacklist = {},
--Constant xxx ctermfg=179 guifg=#deb974 -- --String xxx ctermfg=107 guifg=#a0c980
--Character xxx ctermfg=107 guifg=#a0c980 -- --Constant xxx ctermfg=179 guifg=#deb974
--Number xxx ctermfg=107 guifg=#a0c980 -- --Character xxx ctermfg=107 guifg=#a0c980
--Boolean xxx ctermfg=107 guifg=#a0c980 -- --Number xxx ctermfg=107 guifg=#a0c980
--Float xxx ctermfg=107 guifg=#a0c980 -- --Boolean xxx ctermfg=107 guifg=#a0c980
--Function xxx ctermfg=110 guifg=#6cb6eb -- --Float xxx ctermfg=107 guifg=#a0c980
--Identifier xxx ctermfg=72 guifg=#5dbbc1 -- --Function xxx ctermfg=110 guifg=#6cb6eb
--Conditional xxx ctermfg=176 guifg=#d38aea -- --Identifier xxx ctermfg=72 guifg=#5dbbc1
--Statement xxx ctermfg=176 guifg=#d38aea -- --Conditional xxx ctermfg=176 guifg=#d38aea
--Repeat xxx ctermfg=176 guifg=#d38aea -- --Statement xxx ctermfg=176 guifg=#d38aea
--Label xxx ctermfg=179 guifg=#deb974 -- --Repeat xxx ctermfg=176 guifg=#d38aea
--Operator xxx ctermfg=176 guifg=#d38aea -- --Label xxx ctermfg=179 guifg=#deb974
--Keyword xxx ctermfg=176 guifg=#d38aea -- --Operator xxx ctermfg=176 guifg=#d38aea
--Exception xxx ctermfg=176 guifg=#d38aea -- --Keyword xxx ctermfg=176 guifg=#d38aea
--Include xxx ctermfg=176 guifg=#d38aea -- --Exception xxx ctermfg=176 guifg=#d38aea
--PreProc xxx ctermfg=176 guifg=#d38aea -- --Include xxx ctermfg=176 guifg=#d38aea
--Define xxx ctermfg=176 guifg=#d38aea -- --PreProc xxx ctermfg=176 guifg=#d38aea
--Macro xxx ctermfg=179 guifg=#deb974 -- --Define xxx ctermfg=176 guifg=#d38aea
--PreCondit xxx ctermfg=176 guifg=#d38aea -- --Macro xxx ctermfg=179 guifg=#deb974
--StorageClass xxx ctermfg=203 guifg=#ec7279 -- --PreCondit xxx ctermfg=176 guifg=#d38aea
--Type xxx ctermfg=203 guifg=#ec7279 -- --StorageClass xxx ctermfg=203 guifg=#ec7279
--Structure xxx ctermfg=203 guifg=#ec7279 -- --Type xxx ctermfg=203 guifg=#ec7279
--Typedef xxx ctermfg=176 guifg=#d38aea -- --Structure xxx ctermfg=203 guifg=#ec7279
--Tag xxx ctermfg=179 guifg=#deb974 -- --Typedef xxx ctermfg=176 guifg=#d38aea
--Special xxx ctermfg=179 guifg=#deb974 -- --Tag xxx ctermfg=179 guifg=#deb974
--SpecialChar xxx ctermfg=179 guifg=#deb974 -- --Special xxx ctermfg=179 guifg=#deb974
--Delimiter xxx ctermfg=250 guifg=#c5cdd9 -- --SpecialChar xxx ctermfg=179 guifg=#deb974
--SpecialComment xxx cterm=italic ctermfg=246 gui=italic guifg=#758094 -- --Delimiter xxx ctermfg=250 guifg=#c5cdd9
symbols = { -- --SpecialComment xxx cterm=italic ctermfg=246 gui=italic guifg=#758094
File = { icon = "", hl = "Special" }, -- symbols = {
Module = { icon = "", hl = "Special" }, -- File = { icon = "", hl = "Special" },
Namespace = { icon = "", hl = "Special" }, -- Module = { icon = "", hl = "Special" },
Package = { icon = "", hl = "Special" }, -- Namespace = { icon = "", hl = "Special" },
Class = { icon = "𝓒", hl = "Structure" }, -- Package = { icon = "", hl = "Special" },
Method = { icon = "ƒ", hl = "Function" }, -- Class = { icon = "𝓒", hl = "Structure" },
Property = { icon = "", hl = "Identifier" }, -- Method = { icon = "ƒ", hl = "Function" },
Field = { icon = "", hl = "Identifier" }, -- Property = { icon = "", hl = "Identifier" },
Constructor = { icon = "", hl = "Function" }, -- Field = { icon = "", hl = "Identifier" },
Enum = { icon = "", hl = "Structure" }, -- Constructor = { icon = "", hl = "Function" },
Interface = { icon = "", hl = "Structure" }, -- Enum = { icon = "ℰ", hl = "Structure" },
Function = { icon = "", hl = "Function" }, -- Interface = { icon = "ﰮ", hl = "Structure" },
Variable = { icon = "", hl = "Identifier" }, -- Function = { icon = "", hl = "Function" },
Constant = { icon = "", hl = "Identifier" }, -- Variable = { icon = "", hl = "Identifier" },
String = { icon = "𝓐", hl = "String" }, -- Constant = { icon = "", hl = "Identifier" },
Number = { icon = "#", hl = "Number" }, -- String = { icon = "𝓐", hl = "String" },
Boolean = { icon = "", hl = "Boolean" }, -- Number = { icon = "#", hl = "Number" },
Array = { icon = "", hl = "Structure" }, -- Boolean = { icon = "⊨", hl = "Boolean" },
Object = { icon = "⦿", hl = "Structure" }, -- Array = { icon = "", hl = "Structure" },
Key = { icon = "", hl = "Keyword" }, -- Object = { icon = "⦿", hl = "Structure" },
Null = { icon = "NULL", hl = "Normal" }, -- Key = { icon = "", hl = "Keyword" },
EnumMember = { icon = "", hl = "Variable" }, -- Null = { icon = "NULL", hl = "Normal" },
Struct = { icon = "𝓢", hl = "Structure" }, -- EnumMember = { icon = "", hl = "Variable" },
Event = { icon = "", hl = "Special" }, -- Struct = { icon = "𝓢", hl = "Structure" },
Operator = { icon = "+", hl = "Operator" }, -- Event = { icon = "", hl = "Special" },
TypeParameter = { icon = "𝙏", hl = "Type" } -- Operator = { icon = "+", hl = "Operator" },
} -- TypeParameter = { icon = "𝙏", hl = "Type" }
} -- }
--}
end end
return M return M

17
lua/core/gui.lua

@ -4,24 +4,23 @@ vim.g.gui_font_size = vim.g.gui_font_default_size
vim.g.gui_font_face = "SFMono NERD Font" vim.g.gui_font_face = "SFMono NERD Font"
RefreshGuiFont = function() RefreshGuiFont = function()
vim.opt.guifont = string.format("%s:h%s",vim.g.gui_font_face, vim.g.gui_font_size) vim.opt.guifont = string.format("%s:h%s", vim.g.gui_font_face, vim.g.gui_font_size)
end end
ResizeGuiFont = function(delta) ResizeGuiFont = function(delta)
vim.g.gui_font_size = vim.g.gui_font_size + delta vim.g.gui_font_size = vim.g.gui_font_size + delta
RefreshGuiFont() RefreshGuiFont()
end end
ResetGuiFont = function() ResetGuiFont = function()
vim.g.gui_font_size = vim.g.gui_font_default_size vim.g.gui_font_size = vim.g.gui_font_default_size
RefreshGuiFont() RefreshGuiFont()
end end
ResetGuiFont() ResetGuiFont()
-- Keymaps -- Keymaps
local opts = { noremap = true, silent = true } local opts = { noremap = true, silent = true }
vim.keymap.set({'n', 'i'}, "<D-0>", function() ResetGuiFont() end, opts) vim.keymap.set({ 'n', 'i' }, "<D-0>", function() ResetGuiFont() end, opts)
vim.keymap.set({'n', 'i'}, "<D-=>", function() ResizeGuiFont(1) end, opts) vim.keymap.set({ 'n', 'i' }, "<D-=>", function() ResizeGuiFont(1) end, opts)
vim.keymap.set({'n', 'i'}, "<D-->", function() ResizeGuiFont(-1) end, opts) vim.keymap.set({ 'n', 'i' }, "<D-->", function() ResizeGuiFont(-1) end, opts)

34
lua/core/init.lua

@ -1,21 +1,25 @@
-- basics -- basics
vim.cmd('syntax on') vim.cmd('syntax on')
vim.cmd('filetype plugin indent on') vim.cmd('filetype plugin indent on')
vim.opt.number = true vim.opt.number = true
vim.opt.relativenumber = true vim.opt.relativenumber = true
vim.opt.termguicolors = true vim.opt.termguicolors = true
vim.opt.shiftround = true vim.opt.shiftround = true
vim.opt.updatetime = 100 vim.opt.updatetime = 100
vim.opt.cursorline = true vim.opt.cursorline = true
vim.opt.autowrite = true vim.opt.autowrite = true
if (vim.fn.has('termguicolors') == 1) then if (vim.fn.has('termguicolors') == 1) then
vim.opt.termguicolors = true vim.opt.termguicolors = true
end end
-- tabs -- tabs
vim.opt.autoindent = true vim.opt.autoindent = true
vim.opt.tabstop = 4 vim.opt.tabstop = 4
vim.opt.shiftwidth = 4 vim.opt.shiftwidth = 4
vim.opt.softtabstop = 4 vim.opt.softtabstop = 4
vim.opt.mouse = 'a'
vim.opt.expandtab = true
vim.opt.autowrite = false
vim.opt.formatoptions = ''
require("core.keymaps") require("core.keymaps")
--require("core.dvorak") -- delete this line if you don't like using DVORAK --require("core.dvorak") -- delete this line if you don't like using DVORAK
@ -40,9 +44,9 @@ vim.g.loaded_remote_plugins = 1
require("core.theme") require("core.theme")
require('image').setup { require('image').setup {
min_padding = 5, min_padding = 5,
show_label = true, show_label = true,
render_using_dither = true, render_using_dither = true,
} }
-- Load plugin configs -- Load plugin configs

4
lua/core/keymaps.lua

@ -30,10 +30,6 @@ vim.keymap.set('n', '<F10>', function() require 'telescope.builtin'.git_files {}
vim.keymap.set('n', '<F11>', function() require 'telescope.builtin'.buffers {} end) vim.keymap.set('n', '<F11>', function() require 'telescope.builtin'.buffers {} end)
vim.keymap.set({ 'n', 'i' }, '<C-p>', function() require 'telescope.builtin'.registers {} end) vim.keymap.set({ 'n', 'i' }, '<C-p>', function() require 'telescope.builtin'.registers {} end)
-- w: window -- w: window
vim.keymap.set('n', '<leader>wh', '<c-w>h')
vim.keymap.set('n', '<leader>wj', '<c-w>j')
vim.keymap.set('n', '<leader>wk', '<c-w>k')
vim.keymap.set('n', '<leader>wl', '<c-w>l')
vim.keymap.set('n', '<leader>w1', '<c-w>o') vim.keymap.set('n', '<leader>w1', '<c-w>o')
vim.keymap.set('n', '<leader>wx', ':x<cr>') vim.keymap.set('n', '<leader>wx', ':x<cr>')
vim.keymap.set('n', '<leader>w2', ':sp<cr>') vim.keymap.set('n', '<leader>w2', ':sp<cr>')

11
lua/core/theme.lua

@ -46,11 +46,14 @@
--vim.cmd("colorscheme kanagawa") --vim.cmd("colorscheme kanagawa")
-- edge -- edge
vim.g.edge_style = 'aura' -- neon, aura --vim.g.edge_style = 'aura' -- neon, aura
vim.g.edge_better_performance = 1 --vim.g.edge_better_performance = 1
vim.cmd("colorscheme edge") --vim.cmd("colorscheme edge")
-- github -- github
-- vim.cmd("colorscheme github_dark") vim.cmd("colorscheme github_dark_default")
-- oxocarbon
-- vim.cmd("colorscheme oxocarbon-lua")
vim.cmd("set background=dark") vim.cmd("set background=dark")

Loading…
Cancel
Save