Compare commits

...

6 Commits

5 changed files with 96 additions and 19 deletions

View File

@ -275,6 +275,16 @@
"key_code": "right_option" "key_code": "right_option"
} }
] ]
},
{
"from": {
"key_code": "non_us_backslash"
},
"to": [
{
"key_code": "grave_accent_and_tilde"
}
]
} }
] ]
}, },
@ -364,6 +374,40 @@
"ignore": false, "ignore": false,
"manipulate_caps_lock_led": true, "manipulate_caps_lock_led": true,
"simple_modifications": [] "simple_modifications": []
},
{
"disable_built_in_keyboard_if_exists": false,
"fn_function_keys": [],
"identifiers": {
"is_keyboard": true,
"is_pointing_device": false,
"product_id": 30264,
"vendor_id": 3141
},
"ignore": false,
"manipulate_caps_lock_led": true,
"simple_modifications": [
{
"from": {
"key_code": "left_command"
},
"to": [
{
"key_code": "left_option"
}
]
},
{
"from": {
"key_code": "left_option"
},
"to": [
{
"key_code": "right_command"
}
]
}
]
} }
], ],
"fn_function_keys": [ "fn_function_keys": [

View File

@ -84,9 +84,7 @@ call plug#begin('~/.config/nvim/plugged')
" Markdown " Markdown
Plug 'tpope/vim-markdown' Plug 'tpope/vim-markdown'
" Nerd Tree " Live-preview
Plug 'preservim/nerdtree'
Plug 'ryanoasis/vim-devicons'
Plug 'nmante/vim-latex-live-preview' Plug 'nmante/vim-latex-live-preview'
" Goyo plugin for writing mutt mail " Goyo plugin for writing mutt mail
@ -113,9 +111,6 @@ call plug#begin('~/.config/nvim/plugged')
Plug 'pearofducks/ansible-vim', { 'do': './UltiSnips/generate.sh' } Plug 'pearofducks/ansible-vim', { 'do': './UltiSnips/generate.sh' }
Plug 'Yggdroot/indentLine' Plug 'Yggdroot/indentLine'
" GoLang
Plug 'fatih/vim-go'
" Multiple cursors " Multiple cursors
Plug 'terryma/vim-multiple-cursors' Plug 'terryma/vim-multiple-cursors'
@ -152,6 +147,10 @@ call plug#begin('~/.config/nvim/plugged')
" Telescope " Telescope
Plug 'nvim-lua/plenary.nvim' Plug 'nvim-lua/plenary.nvim'
Plug 'nvim-telescope/telescope.nvim' Plug 'nvim-telescope/telescope.nvim'
" Tree
Plug 'kyazdani42/nvim-web-devicons'
Plug 'kyazdani42/nvim-tree.lua'
call plug#end() call plug#end()
" LUA " LUA
@ -186,7 +185,7 @@ local handlers = {
-- 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', 'ansiblels' } local servers = { 'pyright', 'bashls', 'ansiblels', 'gopls' }
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,
@ -216,6 +215,33 @@ require'lspconfig'.yamlls.setup{
} }
} }
-- Setup GoLang
require'lspconfig'.gopls.setup {
cmd = {"gopls", "serve"},
filetypes = {"go", "gomod"},
on_attach = on_attach,
handlers=handlers,
capabilities = capabilities,
settings = {
gopls = {
analyses = {
unusedparams = true,
},
staticcheck = true,
linksInHover = false,
codelenses = {
generate = true,
gc_details = true,
regenerate_cgo = true,
tidy = true,
upgrade_depdendency = true,
vendor = true,
},
usePlaceholders = true,
},
},
}
-- luasnip setup -- luasnip setup
local luasnip = require 'luasnip' local luasnip = require 'luasnip'
@ -283,6 +309,9 @@ cmp.setup.cmdline('/', {
} }
}) })
require'nvim-tree'.setup {
}
EOF EOF
" Added popout window to see diagnostic " Added popout window to see diagnostic
@ -470,7 +499,9 @@ let g:multi_cursor_quit_key = '<Esc>'
" Others " Others
nnoremap ee :!mupdf $(echo % \| sed 's/tex$/pdf/') & disown<CR><CR> nnoremap ee :!mupdf $(echo % \| sed 's/tex$/pdf/') & disown<CR><CR>
map <C-d> :NERDTreeToggle<CR> map <C-d> :NvimTreeToggle<CR>
nnoremap <leader>r :NvimTreeRefresh<CR>
nnoremap <leader>n :NvimTreeFindFile<CR>
nnoremap <silent> <C-t> :tabnew <CR> nnoremap <silent> <C-t> :tabnew <CR>
nnoremap <F11> :Goyo <CR> nnoremap <F11> :Goyo <CR>
cnoremap w!! execute 'silent! write !sudo tee % >/dev/null' <bar> edit! cnoremap w!! execute 'silent! write !sudo tee % >/dev/null' <bar> edit!

View File

@ -1,8 +1,10 @@
#!/bin/bash #!/bin/bash
npm -g i pyright bash-language-server --force npm -g i pyright --force
npm -g i bash-language-server --force
npm -g i yaml-language-server --force npm -g i yaml-language-server --force
npm -g i @ansible/ansible-language-server --force npm -g i @ansible/ansible-language-server --force
GO111MODULE=on go install mvdan.cc/sh/v3/cmd/shfmt@latest GO111MODULE=on go install mvdan.cc/sh/v3/cmd/shfmt@latest
GO111MODULE=on go install golang.org/x/tools/gopls@latest
pip install black pip install black
pip3 install black pip3 install black

View File

@ -1,10 +0,0 @@
#!/bin/bash
docker stop "$(docker ps --all | grep -i jupyter | awk '{print $1}')" > /dev/null
docker rm "$(docker ps --all | grep -i jupyter| awk '{print $1}')" > /dev/null
docker pull jupyter/scipy-notebook:latest
docker run \
--rm \
-p 8888:8888 \
-e JUPYTER_ENABLE_LAB=yes \
-v "$HOME/Documents/Collage/Semestr2/MG":/home/jovyan/ \
jupyter/scipy-notebook

10
.local/bin/jupyter-note Executable file
View File

@ -0,0 +1,10 @@
#!/bin/bash
docker stop "$(docker ps --all | grep -i jupyter | awk '{print $1}')" >/dev/null
docker rm "$(docker ps --all | grep -i jupyter | awk '{print $1}')" >/dev/null
docker pull jupyter/scipy-notebook:latest
docker run \
--rm \
-p 8888:8888 \
-e JUPYTER_ENABLE_LAB=yes \
-v "$HOME/MEGA/Documents/Collage/":/home/jovyan/ \
jupyter/scipy-notebook