Compare commits

..

No commits in common. "94a11fc4d4f075f73b2d501e06c3f1e10622e054" and "4245c60b54d1a9cdc9c245e0a519a70211b353c5" have entirely different histories.

33 changed files with 43 additions and 1324 deletions

35
.vimrc
View File

@ -1,35 +0,0 @@
syntax on
set modelines=0
set hidden
set number
set ruler
set visualbell
set textwidth=120
set cursorline
hi CursorLine term=bold cterm=bold ctermbg=darkgrey
set tabstop=2
set shiftwidth=2
set matchpairs+=<:>
set showmode
set showcmd
set showmatch
set hlsearch
set ignorecase
set smartcase
set incsearch
set wrapscan
set scrolloff=999
set backspace=indent,eol,start
set mouse=nicr
"Leader
nnoremap <SPACE> <Nop>
let mapleader=" "
"mappings
map <leader>h :set cursorline!<CR>
"map <leader>c :!yarn copy-start<CR>
"map <leader>b :!yarn build<CR>
"map <leader>bs :!yarn build-start<CR>
xnoremap p "_dP
nnoremap <esc><esc> :noh<return><esc>

View File

@ -1,8 +0,0 @@
let g:netrw_dirhistmax =10
let g:netrw_dirhistcnt =6
let g:netrw_dirhist_6='/home/markus/.vim'
let g:netrw_dirhist_5='/home/markus/dev/typescript/node-pos-erp-mapper/server/components/sap/fi'
let g:netrw_dirhist_4='/home/markus/dev/typescript/node-pos-erp-mapper/server/components/sap'
let g:netrw_dirhist_3='/home/markus/dev/typescript/node-pos-erp-mapper/server/components'
let g:netrw_dirhist_2='/home/markus/dev/typescript/node-pos-erp-mapper/server'
let g:netrw_dirhist_1='/home/markus/dev/typescript/node-pos-erp-mapper'

View File

@ -1,19 +0,0 @@
vim.g.mapleader = " "
require('keymap')
require('plugins')
require('globals_opts')
require('native_commands')
require('nvim-lightbulb_config')
require('nvimtree')
require('treesitter_config')
require('dap_config')
require('mason_config')
require('new_lsp_conf')
require('cmp_config')
require('toggleterm_config')
require('virtual_lines_config')
require("null-ls_config")
require("telescope_config")
require("nvimtest_config")
require("neotest_config")
require("trouble_config")

View File

@ -1,141 +0,0 @@
set runtimepath^=/.vim runtimepath+=~/.vim/after
let &packpath = &runtimepath
"syntax on
set modelines=0
set hidden
set number
set ruler
set visualbell
set textwidth=120
set cursorline
hi CursorLine term=bold cterm=bold ctermbg=darkgrey
set tabstop=2
set softtabstop=2
set expandtab
set shiftwidth=2
set matchpairs+=<:>
set showmode
set showcmd
set showmatch
set hlsearch
set ignorecase
set smartcase
set incsearch
set wrapscan
set scrolloff=999
set backspace=indent,eol,start
set mouse=nicr
set termguicolors
call plug#begin(stdpath('data') . '/plugged')
Plug 'williamboman/mason.nvim'
Plug 'williamboman/mason-lspconfig.nvim'
Plug 'nvim-lua/plenary.nvim'
Plug 'junegunn/vim-easy-align'
Plug 'morhetz/gruvbox'
Plug 'junegunn/fzf', {'do': {->fzf#install()}}
Plug 'junegunn/fzf.vim'
Plug 'gfanto/fzf-lsp.nvim'
Plug 'nvim-lua/lsp-status.nvim'
Plug 'jiangmiao/auto-pairs'
Plug 'machakann/vim-sandwich'
Plug 'machakann/vim-highlightedyank'
Plug 'bling/vim-airline'
Plug 'airblade/vim-gitgutter'
Plug 'rhysd/vim-clang-format'
Plug 'easymotion/vim-easymotion'
Plug 'neovim/nvim-lspconfig'
Plug 'kosayoda/nvim-lightbulb'
Plug 'hrsh7th/cmp-nvim-lsp'
Plug 'hrsh7th/cmp-buffer'
Plug 'hrsh7th/cmp-path'
Plug 'hrsh7th/cmp-cmdline'
Plug 'hrsh7th/nvim-cmp'
Plug 'saadparwaiz1/cmp_luasnip'
Plug 'L3MON4D3/LuaSnip'
Plug 'kyazdani42/nvim-web-devicons'
Plug 'kyazdani42/nvim-tree.lua'
Plug 'tpope/vim-fugitive'
Plug 'mfussenegger/nvim-dap'
Plug 'David-Kunz/jester'
Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
Plug 'waycrate/swhkd-vim'
Plug 'kmonad/kmonad-vim'
Plug 'nvim-lua/plenary.nvim'
Plug 'akinsho/toggleterm.nvim', {'tag' : 'v2.*'}
Plug 'https://git.sr.ht/~whynothugo/lsp_lines.nvim'
Plug 'MunifTanjim/nui.nvim'
Plug 'arnarg/todotxt.nvim'
call plug#end()
autocmd vimenter * colorscheme gruvbox
autocmd BufEnter *.60 :setlocal filetype=sixtyfps
let g:clang_format#auto_format=0
set completeopt=menuone,noselect
highlight NvimTreeFolderIcon guibg=blue
lua require('cmp_config')
lua require('nvimtree')
lua require('lsp_conf')
lua require('treesitter_config')
lua require('dap_config')
lua require('jester')
lua require('mason_config')
lua require('toggleterm_config')
lua require('virtual_lines_config')
lua require('todotxt_config')
"Leader
nnoremap <SPACE> <Nop>
let mapleader=" "
"mappings
map <leader>h :set cursorline!<CR>
"map <leader>c :!yarn copy-start<CR>
"map <leader>b :!yarn build<CR>
"map <leader>bs :!yarn build-start<CR>
nnoremap <C-n> :NvimTreeToggle<CR>
nnoremap <leader>r :NvimTreeRefresh<CR>
nnoremap <leader>n :NvimTreeFindFile<CR>
" NvimTreeOpen, NvimTreeClose, NvimTreeFocus, NvimTreeFindFileToggle, and NvimTreeResize are also available if you need them
xnoremap p "_dP
nnoremap <esc><esc> :noh<return><esc>
map <leader>f :FZF<CR>
map <leader>F :Rg<CR>
nnoremap <leader>ca <cmd>lua vim.lsp.buf.code_action()<cr>
nnoremap <leader>gd <cmd>lua vim.lsp.buf.definition()<cr>
nnoremap <leader>gD <cmd>lua vim.lsp.buf.declaration()<cr>
nnoremap <leader>gr <cmd>lua vim.lsp.buf.references()<cr>
nnoremap <leader>rn <cmd>lua vim.lsp.buf.rename()<cr>
nnoremap <leader>K <cmd>lua vim.lsp.buf.hover()<cr>
nnoremap <leader>b :Buffers<cr>
nnoremap <C-L> :bnext<CR>
nnoremap <C-H> :bprevious<CR>
nnoremap <leader>J <cmd>lua vim.diagnostic.open_float()<cr>
nnoremap <M-F> <cmd>lua vim.lsp.buf.format({async = true})<cr>
inoremap <c-s> <cmd>lua vim.lsp.buf.signature_help()<cr>
nnoremap <F9> <cmd>lua require'dap'.toggle_breakpoint()<cr>
nnoremap <F5> <cmd>lua require'dap'.continue()<cr>
nnoremap <F10> <cmd>lua require'dap'.step_over()<cr>
nnoremap <F11> <cmd>lua require'dap'.step_into()<cr>
tnoremap <Esc><Esc> <C-\><C-n>
nnoremap <leader>td :ToDoTxtTasksToggle<cr>
autocmd BufWritePre *.ts lua vim.lsp.buf.formatting_sync(nil, 1000)
command JestRun :lua require'jester'.run({cmd = "npm run test -t '$result' -- $file"})
command JestRunFile :lua require'jester'.run_file({cmd = "npm run test -t '$result' -- $file"})
command JestRunLast :lua require'jester'.run_last({cmd = "npm run test -t '$result' -- $file"})
command JestDebug :lua require'jester'.debug({cmd = "npm run test -t '$result' -- $file"})
command JestDebugFile :lua require'jester'.debug_file({cmd = "npm run test -t '$result' -- $file"})
command JestDebugLast :lua require'jester'.debug_last({cmd = "npm run test -t '$result' -- $file"})

View File

@ -1,84 +0,0 @@
local cmp = require("cmp")
local luasnip = require("luasnip")
local has_words_before = function()
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil
end
cmp.setup({
snippet = {
expand = function(args)
require('luasnip').lsp_expand(args.body) -- For `luasnip` users.
end,
},
mapping = {
['<C-k>'] = cmp.mapping.select_prev_item(),
['<C-p>'] = cmp.mapping.select_prev_item(),
['<C-j>'] = cmp.mapping.select_next_item(),
['<C-n>'] = cmp.mapping.select_next_item(),
['<C-d>'] = cmp.mapping(cmp.mapping.scroll_docs(-4), { 'i', 'c' }),
['<C-f>'] = cmp.mapping(cmp.mapping.scroll_docs(4), { 'i', 'c' }),
['<C-Space>'] = cmp.mapping(cmp.mapping.complete(), { 'i', 'c' }),
['<C-y>'] = cmp.config.disable, -- Specify `cmp.config.disable` if you want to remove the default `<C-y>` mapping.
['<C-e>'] = cmp.mapping({
i = cmp.mapping.abort(),
c = cmp.mapping.close(),
}),
['<CR>'] = cmp.mapping.confirm({ select = true }),
['<Tab>'] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_next_item()
elseif luasnip.expand_or_jumpable() then
luasnip.expand_or_jump()
elseif has_words_before() then
cmp.complete()
else
fallback()
end
end, { "i", "s" }),
['<S-Tab>'] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_prev_item()
elseif luasnip.jumpable(-1) then
luasnip.jump(-1)
else
fallback()
end
end, { "i", "s" })
},
sources = cmp.config.sources({
{ name = 'path' },
{ name = 'nvim_lsp' },
{ name = 'nvim_lsp_signature_help' },
{ name = 'nvim_lua' },
{ name = 'buffer' },
{ name = 'luasnip' }, -- For luasnip users.
}),
window = {
completion = cmp.config.window.bordered(),
documentation = cmp.config.window.bordered(),
},
formatting = {
fields = { 'menu', 'abbr', 'kind' },
format = function(entry, item)
local menu_icon = {
nvim_lsp = 'λ',
buffer = 'Ω'
}
item.menu = menu_icon[entry.source.name]
return item
end
}
})
cmp.setup.cmdline('/', {
sources = {
{ name = 'buffer' }
}
})
cmp.setup.cmdline(':', {
sources = cmp.config.sources({
{ name = 'path' }
}, { { name = 'cmdline' } })
})

View File

@ -1,27 +0,0 @@
vim.fn.sign_define('DapBreakpoint', {text='🟥', texthl='', linehl='', numhl=''})
vim.fn.sign_define('DapStopped', {text='⭐️', texthl='', linehl='', numhl=''})
local dap = require('dap')
dap.adapters.node2 = {
type = 'executable',
command = 'node',
args = {os.getenv('HOME') .. '/dev/microsoft/vscode-node-debug2/out/src/nodeDebug.js'},
}
dap.configurations.javascript = {
{
name = 'Launch',
type = 'node2',
request = 'launch',
program = '${file}',
cwd = vim.fn.getcwd(),
sourceMaps = true,
protocol = 'inspector',
console = 'integratedTerminal',
},
{
-- For this to work you need to make sure the node process is started with the `--inspect` flag.
name = 'Attach to process',
type = 'node2',
request = 'attach',
processId = require'dap.utils'.pick_process,
},
}

View File

@ -1,51 +0,0 @@
local dap = require('dap')
local function debugJest(testName, filename)
print("starting " .. testName .. " in " .. filename)
dap.run({
type = 'node2',
request = 'launch',
cwd = vim.fn.getcwd(),
runtimeArgs = {'--inspect-brk', '/usr/local/bin/jest', '--no-coverage', '-t', testName, '--', filename},
sourceMaps = true,
protocol = 'inspector',
skipFiles = {'<node_internals>/**/*.js'},
console = 'integratedTerminal',
port = 9229,
})
end
local function attach()
print("attaching")
dap.run({
type = 'node2',
request = 'attach',
cwd = vim.fn.getcwd(),
sourceMaps = true,
protocol = 'inspector',
skipFiles = {'<node_internals>/**/*.js'},
})
end
local function attachToRemote()
print("attaching")
dap.run({
type = 'node2',
request = 'attach',
address = "127.0.0.1",
port = 9229,
localRoot = vim.fn.getcwd(),
remoteRoot = "/home/vcap/app",
sourceMaps = true,
protocol = 'inspector',
skipFiles = {'<node_internals>/**/*.js'},
})
end
return {
debugJest = debugJest,
attach = attach,
attachToRemote = attachToRemote,
}

View File

@ -1,26 +0,0 @@
local set = vim.opt
set.modelines = 0
set.hidden = true
set.number = true
set.ruler = true
set.visualbell = true
set.textwidth = 120
set.cursorline = true
set.tabstop = 2
set.shiftwidth = 2
set.showmode = true
set.showcmd = true
set.showmatch = true
set.hlsearch = true
set.ignorecase = true
set.smartcase = true
set.incsearch = true
set.wrapscan = true
set.scrolloff = 999
set.backspace = "indent,eol,start"
set.mouse = "nicr"
set.termguicolors = true
set.matchpairs:append("<:>")
set.completeopt = "menuone,noselect,preview"
set.expandtab = true
set.relativenumber = true

View File

@ -1,22 +0,0 @@
require'jester'.setup({
cmd = "yarn run test -t '$result' -- $file", -- run command
identifiers = {"test", "it"}, -- used to identify tests
prepend = {"describe"}, -- prepend describe blocks
expressions = {"call_expression"}, -- tree-sitter object used to scan for tests/describe blocks
path_to_jest_run = './node_modules/jest/bin/jest', -- used to run tests
path_to_jest_debug = './node_modules/jest/bin/jest', -- used for debugging
terminal_cmd = ":vsplit | terminal", -- used to spawn a terminal for running tests, for debugging refer to nvim-dap's config
dap = { -- debug adapter configuration
type = 'node2',
request = 'launch',
cwd = vim.fn.getcwd(),
runtimeArgs = {'--inspect-brk', '$path_to_jest', '--no-coverage', '-t', '$result', '--', '$file'},
args = { '--no-cache' },
sourceMaps = 'inline',
protocol = 'inspector',
skipFiles = {'<node_internals>/**/*.js'},
console = 'integratedTerminal',
port = 9229,
disableOptimisticBPs = true
}
})

View File

@ -1,44 +0,0 @@
function map(mode, shortcut, command)
vim.api.nvim_set_keymap(mode, shortcut, command, { noremap = true, silent = true })
end
function nmap(shortcut, command)
map('n', shortcut, command)
end
function imap(shortcut, command)
map('i', shortcut, command)
end
function vmap(shortcut, command)
map('v', shortcut, command)
end
function xmap(shortcut, command)
map('x', shortcut, command)
end
nmap("<SPACE>","<Nop>")
nmap("<Esc><Esc>", ":noh<cr>")
nmap("<C-f>",":ToggleTerm direction=float<cr>")
imap("<C-f>",":ToggleTerm direction=float<cr>")
nmap("<C-l>",":ToggleTerm direction=horizontal size=10<cr>")
imap("<C-l>",":ToggleTerm direction=horizontal size=10<cr>")
xmap("p",'\"_dP')
nmap("<leader>fg", "<cmd>lua require('telescope.builtin').live_grep()<cr>")
nmap("<leader>fb", "<cmd>lua require('telescope.builtin').buffers()<cr>")
nmap("<leader>fh", "<cmd>lua require('telescope.builtin').help_tags()<cr>")
nmap("<leader>ff", "<cmd>lua require('telescope.builtin').find_files()<cr>")
nmap("<leader>b","<cmd>lua require('telescope.builtin').buffers()<cr>")
nmap("<C-n>",":NvimTreeToggle<cr>")
nmap("<leader>r",":NvimTreeRefresh<cr>")
nmap("<leader>n",":NvimTreeToggle<cr>")
nmap("<leader>zn","zf%")
nmap("<leader>y",'\"+y')
vmap("<leader>y",'\"+y')

View File

@ -1,35 +0,0 @@
local capabilites = require('cmp_nvim_lsp').update_capabilities(vim.lsp.protocol.make_client_capabilities())
require'lspconfig'.tsserver.setup{
capabilites = capabilites
}
require'lspconfig'.jsonls.setup{
capabilites = capabilites
}
require'lspconfig'.dockerls.setup{
capabilites = capabilites
}
require'lspconfig'.eslint.setup{
capabilites = capabilites,
settings= {
run = "onSave"
}
}
require'lspconfig'.gdscript.setup{
capabilites = capabilites
}
require'lspconfig'.gopls.setup{
capabilites = capabilites
}
require'lspconfig'.rust_analyzer.setup{
capabilites = capabilites
}
require'lspconfig'.cssls.setup{
capabilites = capabilites
}
require'lspconfig'.bashls.setup{
capabilites = capabilites
}
require'fzf_lsp'.setup()

View File

@ -1,25 +0,0 @@
require('mason').setup({
ui = {
icons = {
package_installed = "",
package_pending = "",
package_uninstalled = ""
}
}
})
require('mason-lspconfig').setup({
ensure_installed = {"tsserver"}
})
require'mason-tool-installer'.setup {
ensure_installed = {
{ 'bash-language-server', auto_update = true },
'lua-language-server',
'vim-language-server',
'stylua',
'json-to-struct',
},
auto_update = false,
run_on_start = true,
start_delay = 3000
}

View File

@ -1,6 +0,0 @@
vim.cmd('hi CursorLine term=bold cterm=bold ctermbg=darkgrey')
vim.cmd[[colorscheme tokyonight]]
vim.cmd([[
runtime macros/sandwich/keymap/surround.vim
]])

View File

@ -1,19 +0,0 @@
require("neotest").setup({
adapters = {
require("neotest-jest")({
jestCommand = "npm test --",
jestConfigFile = "custom.jest.config.ts",
env = { CI = true },
cwd = function(path)
return vim.fn.getcwd()
end,
}),
require("neotest-python")({
dap = { justMyCode = false },
}),
require("neotest-plenary"),
require("neotest-vim-test")({
ignore_file_types = { "python", "vim", "lua" },
}),
},
})

View File

@ -1,106 +0,0 @@
-- Mappings.
-- See `:help vim.diagnostic.*` for documentation on any of the below functions
local opts = { noremap = true, silent = true }
vim.keymap.set('n', '<space>e', vim.diagnostic.open_float, opts)
vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, opts)
vim.keymap.set('n', ']d', vim.diagnostic.goto_next, opts)
vim.keymap.set('n', '<space>q', vim.diagnostic.setloclist, opts)
-- Use an on_attach function to only map the following keys
-- after the language server attaches to the current buffer
local on_attach = function(client, bufnr)
-- Enable completion triggered by <c-x><c-o>
vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc')
-- Mappings.
-- See `:help vim.lsp.*` for documentation on any of the below functions
local bufopts = { noremap = true, silent = true, buffer = bufnr }
vim.keymap.set('n', '<leader>gD', vim.lsp.buf.declaration, bufopts)
vim.keymap.set('n', '<leader>gd', vim.lsp.buf.definition, bufopts)
vim.keymap.set('n', '<leader>K', vim.lsp.buf.hover, bufopts)
vim.keymap.set('n', '<leader>gi', vim.lsp.buf.implementation, bufopts)
vim.keymap.set('n', '<leader>k', vim.lsp.buf.signature_help, bufopts)
vim.keymap.set('n', '<leader>wa', vim.lsp.buf.add_workspace_folder, bufopts)
vim.keymap.set('n', '<leader>wr', vim.lsp.buf.remove_workspace_folder, bufopts)
vim.keymap.set('n', '<leader>wl', function()
print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
end, bufopts)
vim.keymap.set('n', '<leader>D', vim.lsp.buf.type_definition, bufopts)
vim.keymap.set('n', '<leader>rn', vim.lsp.buf.rename, bufopts)
vim.keymap.set('n', '<leader>ca', vim.lsp.buf.code_action, bufopts)
vim.keymap.set('n', '<leader>gr', vim.lsp.buf.references, bufopts)
vim.keymap.set('n', '<leader>f', vim.lsp.buf.format, bufopts)
end
local lsp_flags = {
-- This is the default in Nvim 0.7+
debounce_text_changes = 150,
}
local capabilities = require('cmp_nvim_lsp').default_capabilities(
vim.lsp.protocol.make_client_capabilities()
)
require('mason-lspconfig').setup_handlers {
function(server_name)
require('lspconfig')[server_name].setup {
on_attach = on_attach,
flags = lsp_flags,
capabilities = capabilities
}
end,
['rust_analyzer'] = function()
local rustToolsOpts = {
tools = {
inlay_hints = {
auto = true,
only_current_line = false,
show_parameter_hints = true,
parameter_hints_prefix = "<-",
}
},
server = {
on_attach = on_attach,
capabilities = capabilities,
flags = lsp_flags,
settings = {
["rust_analyzer"] = {
checkOnSave = {
command = "clippy"
}
}
}
}
}
require('rust-tools').setup(rustToolsOpts)
--on_attach = on_attach,
--flags = lsp_flags,
require('lspconfig')['rust_analyzer'].setup {
on_attach = on_attach,
flags = lsp_flags,
-- server-specific settings...
settings = {
["rust-analyzer"] = {}
}
}
end,
['sumneko_lua'] = function()
require('lspconfig')["sumneko_lua"].setup {
on_attach = on_attach,
flags = lsp_flags,
settings = {
Lua = {
diagnostics = {
globals = { "vim" }
}
}
}
}
end,
}
--require('lspconfig')['rust_analyzer'].setup {
-- on_attach = on_attach,
-- flags = lsp_flags,
-- -- Server-specific settings...
-- settings = {
-- ["rust-analyzer"] = {}
-- }
--}

View File

@ -1,9 +0,0 @@
require("null-ls").setup({
sources = {
--require("null-ls").builtins.formatting.stylua,
-- require("null-ls").builtins.diagnostics.eslint,
-- require("null-ls").builtins.completion.spell,
},
})

View File

@ -1 +0,0 @@
require('nvim-lightbulb').setup({ autocmd = { enabled = true } })

View File

@ -1,39 +0,0 @@
require('nvim-test').setup {
run = true, -- run tests (using for debug)
commands_create = true, -- create commands (TestFile, TestLast, ...)
filename_modifier = ":.", -- modify filenames before tests run(:h filename-modifiers)
silent = false, -- less notifications
term = "terminal", -- a terminal to run ("terminal"|"toggleterm")
termOpts = {
direction = "vertical", -- terminal's direction ("horizontal"|"vertical"|"float")
width = 96, -- terminal's width (for vertical|float)
height = 24, -- terminal's height (for horizontal|float)
go_back = false, -- return focus to original window after executing
stopinsert = "auto", -- exit from insert mode (true|false|"auto")
keep_one = true, -- keep only one terminal for testing
},
runners = { -- setup tests runners
cs = "nvim-test.runners.dotnet",
go = "nvim-test.runners.go-test",
haskell = "nvim-test.runners.hspec",
javacriptreact = "nvim-test.runners.jest",
javascript = "nvim-test.runners.jest",
lua = "nvim-test.runners.busted",
python = "nvim-test.runners.pytest",
ruby = "nvim-test.runners.rspec",
rust = "nvim-test.runners.cargo-test",
typescript = "nvim-test.runners.jest",
typescriptreact = "nvim-test.runners.jest",
}
}
require('nvim-test.runners.jest'):setup {
command = "jest", -- a command to run the test runner
args = { "--collectCoverage=false" }, -- default arguments
env = { CUSTOM_VAR = 'value' }, -- custom environment variables
file_pattern = "\\v(__tests__/.*|(spec|test))\\.(js|jsx|coffee|ts|tsx)$", -- determine whether a file is a testfile
find_files = { "{name}.test.{ext}", "{name}.spec.{ext}" }, -- find testfile for a file
filename_modifier = nil, -- modify filename before tests run (:h filename-modifiers)
working_directory = nil, -- set working directory (cwd by default)
}

View File

@ -1,110 +0,0 @@
require'nvim-tree'.setup {
renderer ={
icons = {
padding = ' ',
symlink_arrow = ' >> ',
show = {
git=true,
folder=true,
file=true,
folder_arrow= false
},
glyphs = {
default= "",
symlink= "",
git= {
unstaged= "",
staged= "",
unmerged= "",
renamed= "",
untracked= "",
deleted= "",
ignored= ""
},
folder= {
arrow_open= "",
arrow_closed= "",
default= "",
open= "",
empty= "",
empty_open= "",
symlink= "",
symlink_open= "",
}
},
},
add_trailing = true,
highlight_opened_files = "all",
root_folder_modifier = ':~',
special_files = {
'README.md',
'Makefile',
'MAKEFILE'
},
highlight_git = true,
indent_markers = {
enable = true,
icons = {
corner = "",
edge = "",
none = " ",
}
}
},
respect_buf_cwd = true,
disable_netrw = true,
hijack_netrw = true,
open_on_setup = false,
ignore_ft_on_setup = {},
open_on_tab = false,
hijack_cursor = true,
auto_reload_on_write = true,
update_cwd = false,
diagnostics = {
enable = true,
icons = {
hint = "",
info = "",
warning = "",
error = "",
}
},
update_focused_file = {
enable = true,
update_cwd = true,
ignore_list = {}
},
system_open = {
cmd = nil,
args = {}
},
filters = {
dotfiles = false,
custom = {}
},
git={
ignore = false,
enable= true,
timeout=500,
},
actions = {
open_file = {
resize_window = false,
window_picker = {
exclude = {
filetype = { "notify", "packer", "qf", "diff", "fugitive", "fugitiveblame" },
buftype = { "nofile","terminal","help" }
}
}
}
},
view = {
width = 35,
hide_root_folder = false,
side = 'left',
mappings = {
custom_only = false,
list = {}
}
}
}

View File

@ -1,94 +0,0 @@
require("packer").startup(function(use)
use("wbthomason/packer.nvim")
use({
"williamboman/mason.nvim",
"williamboman/mason-lspconfig.nvim",
"neovim/nvim-lspconfig",
"WhoIsSethDaniel/mason-tool-installer.nvim",
})
use("mfussenegger/nvim-dap")
use("jose-elias-alvarez/null-ls.nvim")
use({
"nvim-telescope/telescope.nvim",
tag = "0.1.0",
requires = { { "nvim-lua/plenary.nvim" } },
})
use("nvim-lua/lsp-status.nvim")
use("jiangmiao/auto-pairs")
use("machakann/vim-sandwich")
use("machakann/vim-highlightedyank")
use("bling/vim-airline")
use("airblade/vim-gitgutter")
use("easymotion/vim-easymotion")
use({
"antoinemadec/FixCursorHold.nvim",
"kosayoda/nvim-lightbulb",
})
use("hrsh7th/cmp-nvim-lsp")
use("hrsh7th/cmp-nvim-lsp-signature-help")
use("hrsh7th/cmp-nvim-lua")
use("hrsh7th/cmp-buffer")
use("hrsh7th/cmp-path")
use("hrsh7th/cmp-vsnip")
use("hrsh7th/vim-vsnip")
use("hrsh7th/nvim-cmp")
use("hrsh7th/cmp-cmdline")
use("saadparwaiz1/cmp_luasnip")
use("L3MON4D3/LuaSnip")
use("kyazdani42/nvim-web-devicons")
use("kyazdani42/nvim-tree.lua")
use("tpope/vim-fugitive")
use({
"nvim-treesitter/nvim-treesitter",
run = function()
require("nvim-treesitter.install").update({ with_sync = true })
end,
})
use("folke/tokyonight.nvim")
use("simrat39/rust-tools.nvim")
use({
"akinsho/toggleterm.nvim",
tag = "v2.*",
config = function()
require("toggleterm").setup()
end,
})
use("https://git.sr.ht/~whynothugo/lsp_lines.nvim")
--use 'morhetz/gruvbox'
use({
"folke/which-key.nvim",
config = function()
require("which-key").setup({})
end,
})
use("gbrlsnchs/telescope-lsp-handlers.nvim")
use({
"klen/nvim-test",
config = function()
require("nvim-test").setup()
end,
})
use({
"nvim-neotest/neotest",
requires = {
"nvim-lua/plenary.nvim",
"nvim-treesitter/nvim-treesitter",
"antoinemadec/FixCursorHold.nvim",
"haydenmeade/neotest-jest",
"nvim-neotest/neotest-python",
"nvim-neotest/neotest-plenary",
"nvim-neotest/neotest-vim-test",
},
})
use({
"MunifTanjim/prettier.nvim",
requires = {
"jose-elias-alvarez/null-ls.nvim",
"neovim/nvim-lspconfig",
},
})
use {
"folke/trouble.nvim",
requires = "kyazdani42/nvim-web-devicons"
}
end)

View File

@ -1,10 +0,0 @@
require('telescope').load_extension('lsp_handlers')
require('telescope').setup({
extensions = {
lsp_handlers = {
code_action = {
telescope = require('telescope.themes').get_dropdown({}),
},
},
},
})

View File

@ -1,9 +0,0 @@
todo = require('todotxt-nvim')
todo.setup({
todo_file = '~/todotxt/todo.txt',
sidebar = {
width = 40,
position = 'right'
}
}
)

View File

@ -1,13 +0,0 @@
require"toggleterm".setup{
open_mapping = [[<c-y>]],
hide_numbers = true,
--direction = 'float',
float_opts = {
border = 'curved'
},
winbar = {
enabled = false
}
}

View File

@ -1,38 +0,0 @@
require'nvim-treesitter.configs'.setup {
-- One of "all", "maintained" (parsers with maintainers), or a list of languages
ensure_installed = "all",
-- Install languages synchronously (only applied to `ensure_installed`)
sync_install = false,
-- List of parsers to ignore installing
ignore_install = { },
highlight = {
-- `false` will disable the whole extension
enable = true,
-- list of language that will be disabled
disable = { },
-- Setting this to true will run `:h syntax` and tree-sitter at the same time.
-- Set this to `true` if you depend on 'syntax' being enabled (like for indentation).
-- Using this option may slow down your editor, and you may see some duplicate highlights.
-- Instead of true it can also be a list of languages
additional_vim_regex_highlighting = false,
},
}
--- Treesitter
---BEGINWORKAROUND
--vim.api.nvim_create_autocmd({'BufEnter','BufAdd','BufNew','BufNewFile','BufWinEnter'}, {
-- group = vim.api.nvim_create_augroup('TS_FOLD_WORKAROUND', {}),
-- callback = function()
-- vim.opt.foldmethod = 'expr'
-- vim.opt.foldexpr = 'nvim_treesitter#foldexpr()'
-- end
--})
---ENDWORKAROUND
--- Treesitter
--- Utility functions
---

View File

@ -1,75 +0,0 @@
require('trouble').setup {
position = "bottom", -- position of the list can be: bottom, top, left, right
height = 10, -- height of the trouble list when position is top or bottom
width = 50, -- width of the list when position is left or right
icons = true, -- use devicons for filenames
mode = "workspace_diagnostics", -- "workspace_diagnostics", "document_diagnostics", "quickfix", "lsp_references", "loclist"
fold_open = "", -- icon used for open folds
fold_closed = "", -- icon used for closed folds
group = true, -- group results by file
padding = true, -- add an extra new line on top of the list
action_keys = { -- key mappings for actions in the trouble list
-- map to {} to remove a mapping, for example:
-- close = {},
close = "q", -- close the list
cancel = "<esc>", -- cancel the preview and get back to your last window / buffer / cursor
refresh = "r", -- manually refresh
jump = { "<cr>", "<tab>" }, -- jump to the diagnostic or open / close folds
open_split = { "<c-x>" }, -- open buffer in new split
open_vsplit = { "<c-v>" }, -- open buffer in new vsplit
open_tab = { "<c-t>" }, -- open buffer in new tab
jump_close = { "o" }, -- jump to the diagnostic and close the list
toggle_mode = "m", -- toggle between "workspace" and "document" diagnostics mode
toggle_preview = "P", -- toggle auto_preview
hover = "K", -- opens a small popup with the full multiline message
preview = "p", -- preview the diagnostic location
close_folds = { "zM", "zm" }, -- close all folds
open_folds = { "zR", "zr" }, -- open all folds
toggle_fold = { "zA", "za" }, -- toggle fold of current file
previous = "k", -- previous item
next = "j" -- next item
},
indent_lines = true, -- add an indent guide below the fold icons
auto_open = false, -- automatically open the list when you have diagnostics
auto_close = false, -- automatically close the list when you have no diagnostics
auto_preview = true, -- automatically preview the location of the diagnostic. <esc> to close preview and go back to last window
auto_fold = false, -- automatically fold a file trouble list at creation
auto_jump = { "lsp_definitions" }, -- for the given modes, automatically jump if there is only a single result
signs = {
-- icons / text used for a diagnostic
error = "",
warning = "",
hint = "",
information = "",
other = ""
},
use_diagnostic_signs = false -- enabling this will use the signs defined in your lsp client
}
vim.keymap.set("n", "<leader>t", "<cmd>TroubleToggle<cr>",
{ silent = true, noremap = true }
)
vim.keymap.set("n", "<leader>tw", "<cmd>TroubleToggle workspace_diagnostics<cr>",
{ silent = true, noremap = true }
)
vim.keymap.set("n", "<leader>td", "<cmd>TroubleToggle document_diagnostics<cr>",
{ silent = true, noremap = true }
)
vim.keymap.set("n", "<leader>tl", "<cmd>TroubleToggle loclist<cr>",
{ silent = true, noremap = true }
)
vim.keymap.set("n", "<leader>tq", "<cmd>TroubleToggle quickfix<cr>",
{ silent = true, noremap = true }
)
local trouble = require("trouble.providers.telescope")
local telescope = require("telescope")
telescope.setup {
defaults = {
mappings = {
i = { ["<c-t>"] = trouble.open_with_trouble },
n = { ["<c-t>"] = trouble.open_with_trouble },
},
},
}

View File

@ -1,9 +0,0 @@
lines = require('lsp_lines')
lines.setup()
vim.diagnostic.config({ virtual_text = false });
vim.keymap.set(
"",
"tl",
lines.toggle,
{ desc = "Toggle lsp_lines" }
);

View File

@ -1,5 +1,5 @@
FROM nginx:alpine FROM nginx:alpine
#RUN apk add --update git && apk add --update openssh RUN apk add --update git && apk add --update openssh
#RUN git clone https://github.com/mightypanders/dotfiles.git RUN git clone https://github.com/mightypanders/dotfiles.git
#WORKDIR /dotfiles/startpage WORKDIR /dotfiles/startpage
COPY . /usr/share/nginx/html COPY . /usr/share/nginx/html

View File

@ -1,5 +1,2 @@
#!/bin/bash #!/bin/bash
REPO="startpage" docker build -t local_startpage:latest .
docker build -t $REPO:latest .
docker tag $REPO:latest registry.brudi.xyz/$REPO:latest
docker push registry.brudi.xyz/$REPO:latest

View File

@ -42,11 +42,15 @@ var sites = {
Work: { Work: {
gitlab: "https://gitlab.com/nutmountain/landgard?sort=updated_desc", gitlab: "https://gitlab.com/nutmountain/landgard?sort=updated_desc",
"enfore api docs": "https://docs.apis.enfore.com/", "enfore api docs": "https://docs.apis.enfore.com/",
"n4 daily":
"https://zoom.us/j/274186354?pwd=Z29yamZaZ3dHV2ZOM1o2UkVHVUdpQT09",
apex: apex:
"https://18.185.159.119:8443/ords/f?p=123:LOGIN_DESKTOP:15410784571178:::::", "https://18.185.159.119:8443/ords/f?p=123:LOGIN_DESKTOP:15410784571178:::::",
aws: aws:
"https://us-east-1.signin.aws.amazon.com/oauth?SignatureVersion=4&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJMOATPLHVSJ563XQ&X-Amz-Date=2019-10-15T15%3A01%3A16.654Z&X-Amz-Signature=5cd9c455e673d043421f5bc47b87c61a438cd5b85d808f85e6b3304f0ef6c2de&X-Amz-SignedHeaders=host&client_id=arn%3Aaws%3Aiam%3A%3A015428540659%3Auser%2Fhomepage&redirect_uri=https%3A%2F%2Fconsole.aws.amazon.com%2Fconsole%2Fhome%3Fstate%3DhashArgs%2523%26isauthcode%3Dtrue&response_type=code&state=hashArgs%23", "https://us-east-1.signin.aws.amazon.com/oauth?SignatureVersion=4&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJMOATPLHVSJ563XQ&X-Amz-Date=2019-10-15T15%3A01%3A16.654Z&X-Amz-Signature=5cd9c455e673d043421f5bc47b87c61a438cd5b85d808f85e6b3304f0ef6c2de&X-Amz-SignedHeaders=host&client_id=arn%3Aaws%3Aiam%3A%3A015428540659%3Auser%2Fhomepage&redirect_uri=https%3A%2F%2Fconsole.aws.amazon.com%2Fconsole%2Fhome%3Fstate%3DhashArgs%2523%26isauthcode%3Dtrue&response_type=code&state=hashArgs%23",
"rc-intranet": "https://realcorevv.sharepoint.com/sites/RC-Intranet/", "rc-intranet": "https://realcorevv.sharepoint.com/sites/RC-Intranet/",
food:
"https://www.rge-essen.de/dienstleistungen/gastronomie/speiseplaene.html",
}, },
Social: { Social: {
WhatsApp: "https://web.whatsapp.com", WhatsApp: "https://web.whatsapp.com",
@ -55,7 +59,16 @@ var sites = {
YouTube: "https://www.youtube.com/", YouTube: "https://www.youtube.com/",
threema: "https://web.threema.ch", threema: "https://web.threema.ch",
}, },
/* "Games": { // To find the game ID check the url in the store page or the community page
"CS:GO" : "steam://run/730",
"Besiege" : "steam://run/346010",
"Rust" : "steam://run/252490",
"Insurgency" : "steam://run/222880",
"West of Loathing" : "steam://run/597220",
"POSTAL 2" : "steam://run/223470"
},*/
News: { News: {
worldnews: "https://reddit.com/r/worldnews",
golem: "https://www.golem.de/", golem: "https://www.golem.de/",
heise: "https://www.heise.de/", heise: "https://www.heise.de/",
WAZ: "http://www.waz.de", WAZ: "http://www.waz.de",
@ -74,29 +87,21 @@ var sites = {
sffpc: "https://reddit.com/r/sffpc", sffpc: "https://reddit.com/r/sffpc",
unixporn: "https://reddit.com/r/unixporn", unixporn: "https://reddit.com/r/unixporn",
games: "https://reddit.com/r/games", games: "https://reddit.com/r/games",
switchhacking: "https://reddit.com/r/switchhaxing+switchhacks", switchhaxing: "https://reddit.com/r/switchhaxing",
switchhacks: "https://reddit.com/r/switchhacks",
}, },
hosted: { brudi: {
yavin: "http://yavin:8181", heimdall: "http://brudi.xyz",
gitea: "http://gitea.brudi.xyz", gitea: "http://gitea.brudi.xyz",
etherpad: "http://pad.brudi.xyz",
send: "http://send.brudi.xyz", send: "http://send.brudi.xyz",
kanban: "http://kanboard.brudi.xyz", kanban: "http://kanboard.brudi.xyz",
media: "https://media.hartzarett.ruhr" pics: "http://pics.brudi.xyz",
},
Games: {
// To find the game ID check the url in the store page or the community page
"CS:GO": "steam://run/730",
"Lost Ark": "steam://run/1599340",
"Golf It!": "steam://run/571740",
PUBG: "steam://run/578080",
// "West of Loathing": "steam://run/597220",
// "POSTAL 2": "steam://run/223470",
}, },
}; };
var search = { var search = {
default: "https://duckduckgo.com/", default: "https://google.com/search",
g: "https://google.com/search",
d: "https://duckduckgo.com/", d: "https://duckduckgo.com/",
s: "https://startpage.com/do/search", s: "https://startpage.com/do/search",
}; };

View File

@ -1,3 +0,0 @@
[Unit]
Description=Wayland Session managed by systemd
BindsTo=graphical-session.target

View File

@ -1,6 +1,5 @@
syntax on syntax on
set modelines=0 set modelines=0
set hidden
set number set number
set ruler set ruler
set visualbell set visualbell
@ -26,10 +25,25 @@ nnoremap <SPACE> <Nop>
let mapleader=" " let mapleader=" "
"mappings "mappings
map <leader>h :set cursorline!<CR> map <leader>h :set cursorline!<CR>
"map <leader>c :!yarn copy-start<CR>
"map <leader>b :!yarn build<CR>
"map <leader>bs :!yarn build-start<CR>
xnoremap p "_dP xnoremap p "_dP
nnoremap <esc><esc> :noh<return><esc> nnoremap <esc><esc> :noh<return><esc>
if has('nvim')
call plug#begin(stdpath('data') . '/plugged')
Plug 'junegunn/vim-easy-align'
Plug 'morhetz/gruvbox'
Plug 'Shougo/deoplete.nvim', {'do':':UpdateRemotePlugins'}
Plug 'junegunn/fzf', {'do': {->fzf#install()}}
Plug 'jiangmiao/auto-pairs'
Plug 'machakann/vim-sandwich'
Plug 'machakann/vim-highlightedyank'
Plug 'bling/vim-airline'
Plug 'airblade/vim-gitgutter'
Plug 'rhysd/vim-clang-format'
Plug 'easymotion/vim-easymotion'
call plug#end()
autocmd vimenter * colorscheme gruvbox
let g:deoplete#enable_at_startup = 1
let g:clang_format#auto_format=1
endif

View File

@ -1,236 +0,0 @@
" Specify a directory for plugins
call plug#begin('~/.vim/plugged')
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'scrooloose/nerdtree'
"Plug 'tsony-tsonev/nerdtree-git-plugin'
Plug 'Xuyuanp/nerdtree-git-plugin'
Plug 'tiagofumo/vim-nerdtree-syntax-highlight'
Plug 'ryanoasis/vim-devicons'
Plug 'airblade/vim-gitgutter'
Plug 'ctrlpvim/ctrlp.vim' " fuzzy find files
Plug 'scrooloose/nerdcommenter'
"Plug 'prettier/vim-prettier', { 'do': 'yarn install' }
Plug 'christoomey/vim-tmux-navigator'
Plug 'morhetz/gruvbox'
Plug 'HerringtonDarkholme/yats.vim' " TS Syntax
" Initialize plugin system
call plug#end()
let mapleader = ","
inoremap jk <ESC>
nmap <C-n> :NERDTreeToggle<CR>
vmap ++ <plug>NERDCommenterToggle
nmap ++ <plug>NERDCommenterToggle
nnoremap <esc> :noh<return><esc>
" open NERDTree automatically
"autocmd StdinReadPre * let s:std_in=1
"autocmd VimEnter * NERDTree
let g:NERDTreeGitStatusWithFlags = 1
"let g:WebDevIconsUnicodeDecorateFolderNodes = 1
"let g:NERDTreeGitStatusNodeColorization = 1
"let g:NERDTreeColorMapCustom = {
"\ "Staged" : "#0ee375",
"\ "Modified" : "#d9bf91",
"\ "Renamed" : "#51C9FC",
"\ "Untracked" : "#FCE77C",
"\ "Unmerged" : "#FC51E6",
"\ "Dirty" : "#FFBD61",
"\ "Clean" : "#87939A",
"\ "Ignored" : "#808080"
"\ }
let g:NERDTreeIgnore = ['^node_modules$']
" vim-prettier
"let g:prettier#quickfix_enabled = 0
"let g:prettier#quickfix_auto_focus = 0
" prettier command for coc
command! -nargs=0 Prettier :CocCommand prettier.formatFile
" run prettier on save
"let g:prettier#autoformat = 0
"autocmd BufWritePre *.js,*.jsx,*.mjs,*.ts,*.tsx,*.css,*.less,*.scss,*.json,*.graphql,*.md,*.vue,*.yaml,*.html PrettierAsync
" ctrlp
let g:ctrlp_user_command = ['.git/', 'git --git-dir=%s/.git ls-files -oc --exclude-standard']
" j/k will move virtual lines (lines that wrap)
noremap <silent> <expr> j (v:count == 0 ? 'gj' : 'j')
noremap <silent> <expr> k (v:count == 0 ? 'gk' : 'k')
set number
set relativenumber
set hlsearch
set incsearch
set wrapscan
set scrolloff=999
set smartcase
set smarttab
set cindent
set tabstop=2
set shiftwidth=2
" always uses spaces instead of tab characters
set expandtab
colorscheme gruvbox
set background=dark
let g:gruvbox_contrast_dark = 'medium'
" sync open file with NERDTree
" " Check if NERDTree is open or active
function! IsNERDTreeOpen()
return exists("t:NERDTreeBufName") && (bufwinnr(t:NERDTreeBufName) != -1)
endfunction
" Call NERDTreeFind iff NERDTree is active, current window contains a modifiable
" file, and we're not in vimdiff
function! SyncTree()
if &modifiable && IsNERDTreeOpen() && strlen(expand('%')) > 0 && !&diff
NERDTreeFind
wincmd p
endif
endfunction
" Highlight currently open buffer in NERDTree
autocmd BufEnter * call SyncTree()
" coc config
let g:coc_global_extensions = [
\ 'coc-snippets',
\ 'coc-pairs',
\ 'coc-tsserver',
\ 'coc-eslint',
\ 'coc-prettier',
\ 'coc-json',
\ ]
" from readme
" if hidden is not set, TextEdit might fail.
set hidden " Some servers have issues with backup files, see #649 set nobackup set nowritebackup " Better display for messages set cmdheight=2 " You will have bad experience for diagnostic messages when it's default 4000.
set updatetime=300
" don't give |ins-completion-menu| messages.
set shortmess+=c
" always show signcolumns
set signcolumn=yes
" Use tab for trigger completion with characters ahead and navigate.
" Use command ':verbose imap <tab>' to make sure tab is not mapped by other plugin.
inoremap <silent><expr> <TAB>
\ pumvisible() ? "\<C-n>" :
\ <SID>check_back_space() ? "\<TAB>" :
\ coc#refresh()
inoremap <expr><S-TAB> pumvisible() ? "\<C-p>" : "\<C-h>"
function! s:check_back_space() abort
let col = col('.') - 1
return !col || getline('.')[col - 1] =~# '\s'
endfunction
" Use <c-space> to trigger completion.
inoremap <silent><expr> <c-space> coc#refresh()
" Use <cr> to confirm completion, `<C-g>u` means break undo chain at current position.
" Coc only does snippet and additional edit on confirm.
inoremap <expr> <cr> pumvisible() ? "\<C-y>" : "\<C-g>u\<CR>"
" Or use `complete_info` if your vim support it, like:
" inoremap <expr> <cr> complete_info()["selected"] != "-1" ? "\<C-y>" : "\<C-g>u\<CR>"
" Use `[g` and `]g` to navigate diagnostics
nmap <silent> [g <Plug>(coc-diagnostic-prev)
nmap <silent> ]g <Plug>(coc-diagnostic-next)
" Remap keys for gotos
nmap <silent> gd <Plug>(coc-definition)
nmap <silent> gy <Plug>(coc-type-definition)
nmap <silent> gi <Plug>(coc-implementation)
nmap <silent> gr <Plug>(coc-references)
" Use K to show documentation in preview window
nnoremap <silent> K :call <SID>show_documentation()<CR>
function! s:show_documentation()
if (index(['vim','help'], &filetype) >= 0)
execute 'h '.expand('<cword>')
else
call CocAction('doHover')
endif
endfunction
" Highlight symbol under cursor on CursorHold
autocmd CursorHold * silent call CocActionAsync('highlight')
" Remap for rename current word
nmap <F2> <Plug>(coc-rename)
" Remap for format selected region
xmap <leader>f <Plug>(coc-format-selected)
nmap <leader>f <Plug>(coc-format-selected)
augroup mygroup
autocmd!
" Setup formatexpr specified filetype(s).
autocmd FileType typescript,json setl formatexpr=CocAction('formatSelected')
" Update signature help on jump placeholder
autocmd User CocJumpPlaceholder call CocActionAsync('showSignatureHelp')
augroup end
" Remap for do codeAction of selected region, ex: `<leader>aap` for current paragraph
xmap <leader>a <Plug>(coc-codeaction-selected)
nmap <leader>a <Plug>(coc-codeaction-selected)
" Remap for do codeAction of current line
nmap <leader>ac <Plug>(coc-codeaction)
" Fix autofix problem of current line
nmap <leader>qf <Plug>(coc-fix-current)
" Create mappings for function text object, requires document symbols feature of languageserver.
xmap if <Plug>(coc-funcobj-i)
xmap af <Plug>(coc-funcobj-a)
omap if <Plug>(coc-funcobj-i)
omap af <Plug>(coc-funcobj-a)
" Use <C-d> for select selections ranges, needs server support, like: coc-tsserver, coc-python
nmap <silent> <C-d> <Plug>(coc-range-select)
xmap <silent> <C-d> <Plug>(coc-range-select)
" Use `:Format` to format current buffer
command! -nargs=0 Format :call CocAction('format')
" Use `:Fold` to fold current buffer
command! -nargs=? Fold :call CocAction('fold', <f-args>)
" use `:OR` for organize import of current buffer
command! -nargs=0 OR :call CocAction('runCommand', 'editor.action.organizeImport')
" Add status line support, for integration with other plugin, checkout `:h coc-status`
set statusline^=%{coc#status()}%{get(b:,'coc_current_function','')}
" Using CocList
" Show all diagnostics
nnoremap <silent> <space>a :<C-u>CocList diagnostics<cr>
" Manage extensions
nnoremap <silent> <space>e :<C-u>CocList extensions<cr>
" Show commands
nnoremap <silent> <space>c :<C-u>CocList commands<cr>
" Find symbol of current document
nnoremap <silent> <space>o :<C-u>CocList outline<cr>
" Search workspace symbols
nnoremap <silent> <space>s :<C-u>CocList -I symbols<cr>
" Do default action for next item.
nnoremap <silent> <space>j :<C-u>CocNext<CR>
" Do default action for previous item.
nnoremap <silent> <space>k :<C-u>CocPrev<CR>
" Resume latest coc list
nnoremap <silent> <space>p :<C-u>CocListResume<CR>

View File

@ -1,3 +0,0 @@
set runtimepath^=/.vim runtimepath+=~/.vim/after
let &packpath = &runtimepath
source ~/.vimrc