This commit is contained in:
Henrik Bakken
2021-07-08 13:21:35 +02:00
parent f484de573a
commit a143a126a2
3 changed files with 23 additions and 18 deletions
+4 -2
View File
@@ -104,8 +104,10 @@ bindsym $mod+Shift+F6 exec i3-sensible-terminal -e 'ncspot'
bindsym $mod+F9 exec --no-startup-id picom -b
bindsym $mod+Shift+F9 exec --no-startup-id pkill picom
bindsym $mod+Shift+F10 --release exec "killall dunst; exec notify-send 'restart dunst'"
bindsym $mod+F12 --release exec "xrandr --output DP-0 --mode 5120x1440 --primary"
bindsym $mod+Shift+F12 --release exec "xrandr --output DP-0 --mode 2560x1440 --primary"
bindsym $mod+F11 exec "setxkbmap -layout no -model pc105 -variant nodeadkeys -option && setxkbmap -layout no -model pc105 -variant nodeadkeys -option caps:escape"
bindsym $mod+Shift+F11 exec "setxkbmap -layout no -model pc105 -variant nodeadkeys -option && setxkbmap -layout no -model pc105 -variant nodeadkeys -option caps:backspace"
bindsym $mod+F12 exec "xrandr --output DP-0 --mode 5120x1440 --primary"
bindsym $mod+Shift+F12 exec "xrandr --output DP-0 --mode 2560x1440 --primary"
bindsym $mod+0 mode "$mode_system"
bindsym $mod+z mode "resize"
+7 -4
View File
@@ -1,13 +1,16 @@
c.InteractiveShellApp.extensions = ["autoreload"]
c.InteractiveShellApp.exec_lines = ["%autoreload 2"]
## Use colors for displaying information about objects. Because this information
# is passed through a pager (like 'less'), and some pagers get confused with
# color codes, this capability can be turned off.
# Default: True
c.InteractiveShell.color_info = True
c.InteractiveShell.separate_in = ''
c.InteractiveShell.separate_in = ""
## Set the color scheme (NoColor, Neutral, Linux, or LightBG).
c.InteractiveShell.colors = 'Linux'
c.TerminalInteractiveShell.colors = 'Linux'
# c.InteractiveShell.colors = "Linux"
# c.TerminalInteractiveShell.colors = "Linux"
## Set to confirm when you try to exit IPython with an EOF (Control-D in Unix,
# Control-Z/Enter in Windows). By typing 'exit' or 'quit', you can force a
@@ -17,7 +20,7 @@ c.TerminalInteractiveShell.confirm_exit = False
## The name or class of a Pygments style to use for syntax highlighting. To see
# available styles, run `pygmentize -L styles`.
# Default: traitlets.Undefined
c.TerminalInteractiveShell.highlighting_style = 'monokai'
# c.TerminalInteractiveShell.highlighting_style = 'monokai'
## Use 24bit colors instead of 256 colors in prompt highlighting. If your
# terminal supports true color, the following command should print 'TRUECOLOR'
+12 -12
View File
@@ -17,8 +17,8 @@ vim.g.BASH_Ctrl_l = "off"
-- looks
opt.termguicolors = true
opt.cmdheight = 2
opt.background = "light"
vim.cmd "colorscheme tokyonight"
opt.background = "dark"
vim.cmd "colorscheme embark"
opt.listchars = "tab:→ ,trail:·,extends:↷,precedes:↶,nbsp:+,eol:↵"
opt.list = true -- Show listchars
opt.showtabline = 2
@@ -37,14 +37,14 @@ opt.splitright = true -- Put new windows right of current
opt.hidden = true -- Enable background buffers
opt.wrap = false -- Disable line wrap
opt.number = true -- Show line numbers
opt.relativenumber = false -- Relative line numbers
opt.relativenumber = true -- Relative line numbers
opt.cursorline = false -- Highlight current line
opt.switchbuf = "useopen" -- Use existing window if buffer is already open
opt.colorcolumn = "88"
-- tabs
opt.expandtab = true -- Use spaces instead of tabs
opt.smartindent = true -- Insert indents automatically
opt.smartindent = false -- Avoid fucking with comment indents
opt.shiftround = true -- Round indent
opt.tabstop = 2 -- Number of spaces tabs count for
opt.shiftwidth = 2 -- Size of an indent
@@ -198,8 +198,8 @@ require("packer").startup {function(use)
noremap = true,
buffer = true,
["n <M-.>"] = { expr = true, [[&diff ? "]c" : "<cmd>lua require("gitsigns.actions").next_hunk()<cr>"]]},
["n <M-,>"] = { expr = true, [[&diff ? "[c" : "<cmd>lua require("gitsigns.actions").prev_hunk()<cr>"]]},
["n <M-.>"] = { expr = true, [[&diff ? "]c" : "<cmd>lua require('gitsigns.actions').next_hunk()<cr>"]]},
["n <M-,>"] = { expr = true, [[&diff ? "[c" : "<cmd>lua require('gitsigns.actions').prev_hunk()<cr>"]]},
["n <leader>s"] = [[<cmd>lua require("gitsigns").stage_hunk()<cr>]],
["v <leader>s"] = [[<cmd>lua require("gitsigns").stage_hunk({vim.fn.line("."), vim.fn.line("v")})<cr>]],
@@ -232,7 +232,7 @@ require("packer").startup {function(use)
-- theme
use {"folke/tokyonight.nvim",
config = function()
vim.g.tokyonight_style = "day"
vim.g.tokyonight_style = "night"
end
}
@@ -335,7 +335,7 @@ require("packer").startup {function(use)
requires = {"kyazdani42/nvim-web-devicons"},
config = function()
require("lualine").setup {
options = { theme = "tokyonight" },
options = { theme = "molokai" },
extensions = {
"fugitive",
},
@@ -534,6 +534,7 @@ require("packer").startup {function(use)
-- other
if client.resolved_capabilities.goto_definition then
bmap(bufnr, "n", "gd", ":Lspsaga preview_definition<cr>", opts)
bmap(bufnr, "n", "gD", ":lua vim.lsp.buf.definition()<cr>", opts)
end
if client.resolved_capabilities.find_references then
bmap(bufnr, "n", "gh", ":Lspsaga lsp_finder<cr>", opts)
@@ -547,7 +548,9 @@ require("packer").startup {function(use)
if client.resolved_capabilities.document_formatting or client.resolved_capabilities.document_range_formatting then
vim.api.nvim_command [[augroup Format]]
vim.api.nvim_command [[autocmd! * <buffer>]]
vim.api.nvim_command [[autocmd BufWritePost <buffer> lua vim.lsp.buf.formatting_seq_sync()]]
vim.api.nvim_command [[autocmd BufWritePost python lua vim.lsp.buf.formatting_seq_sync()]]
vim.api.nvim_command [[autocmd BufWritePost markdown lua vim.lsp.buf.formatting_seq_sync()]]
vim.api.nvim_command [[autocmd BufWritePost yaml lua vim.lsp.buf.formatting_seq_sync()]]
vim.api.nvim_command [[augroup END]]
end
end
@@ -571,9 +574,6 @@ require("packer").startup {function(use)
exec = "<cr>"
},
}
-- terminal TODO fix and replace with Fterm
-- map("n", "<F2>", ":Lspsaga open_floaterm<cr>", opts)
-- map("i", "<F2>", [[<C-\><C-n>:lua require('lspsaga.floaterm').close_float_terminal()]], opts)
local nvim_lsp = require("lspconfig")
-- sudo npm install -g yaml-language-server
nvim_lsp.yamlls.setup{