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")
" 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_scroll_animation_length = 0.3
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:
-- github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md
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
require('lspconfig')[lsp].setup {
on_attach = on_attach

179
lua/configs/symbols_outline.lua

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

34
lua/core/init.lua

@ -1,21 +1,25 @@
-- basics
vim.cmd('syntax on')
vim.cmd('filetype plugin indent on')
vim.opt.number = true
vim.opt.relativenumber = true
vim.opt.termguicolors = true
vim.opt.shiftround = true
vim.opt.updatetime = 100
vim.opt.cursorline = true
vim.opt.autowrite = true
vim.opt.number = true
vim.opt.relativenumber = true
vim.opt.termguicolors = true
vim.opt.shiftround = true
vim.opt.updatetime = 100
vim.opt.cursorline = true
vim.opt.autowrite = true
if (vim.fn.has('termguicolors') == 1) then
vim.opt.termguicolors = true
vim.opt.termguicolors = true
end
-- tabs
vim.opt.autoindent = true
vim.opt.tabstop = 4
vim.opt.shiftwidth = 4
vim.opt.softtabstop = 4
vim.opt.autoindent = true
vim.opt.tabstop = 4
vim.opt.shiftwidth = 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.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('image').setup {
min_padding = 5,
show_label = true,
render_using_dither = true,
min_padding = 5,
show_label = true,
render_using_dither = true,
}
-- 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', 'i' }, '<C-p>', function() require 'telescope.builtin'.registers {} end)
-- 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>wx', ':x<cr>')
vim.keymap.set('n', '<leader>w2', ':sp<cr>')

11
lua/core/theme.lua

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

Loading…
Cancel
Save