update stuffz

This commit is contained in:
LordMZTE 2021-11-05 17:44:11 +01:00
parent c4eeb91e62
commit b0732cae2e
13 changed files with 433 additions and 519 deletions

View file

@ -1,3 +1,3 @@
require("plugins")
require("settings")
require("maps")
require "plugins"
require "settings"
require "maps"

View file

@ -5,17 +5,17 @@ function escape_keycode(keycode)
end
local function check_back_space()
local col = vim.fn.col(".") - 1
return col <= 0 or vim.fn.getline("."):sub(col, col):match("%s")
local col = vim.fn.col "." - 1
return col <= 0 or vim.fn.getline("."):sub(col, col):match "%s"
end
function tab_completion()
if vim.fn.pumvisible() > 0 then
return escape_keycode("<C-n>")
return escape_keycode "<C-n>"
end
if check_back_space() then
return escape_keycode("<TAB>")
return escape_keycode "<TAB>"
end
return vim.fn["coc#refresh"]()
@ -23,9 +23,9 @@ end
function shift_tab_completion()
if vim.fn.pumvisible() > 0 then
return escape_keycode("<C-p>")
return escape_keycode "<C-p>"
else
return escape_keycode("<C-h>")
return escape_keycode "<C-h>"
end
end

View file

@ -15,17 +15,17 @@ vim.g.coc_global_extensions = {
}
local function check_back_space()
local col = vim.fn.col(".") - 1
return col <= 0 or vim.fn.getline("."):sub(col, col):match("%s")
local col = vim.fn.col "." - 1
return col <= 0 or vim.fn.getline("."):sub(col, col):match "%s"
end
function coc.tab_completion()
if vim.fn.pumvisible() > 0 then
return escape_keycode("<C-n>")
return escape_keycode "<C-n>"
end
if check_back_space() then
return escape_keycode("<TAB>")
return escape_keycode "<TAB>"
end
return vim.fn["coc#refresh"]()
@ -33,9 +33,9 @@ end
function coc.shift_tab_completion()
if vim.fn.pumvisible() > 0 then
return escape_keycode("<C-p>")
return escape_keycode "<C-p>"
else
return escape_keycode("<C-h>")
return escape_keycode "<C-h>"
end
end
@ -43,6 +43,6 @@ function coc.cr_completion()
if vim.fn.pumvisible() > 0 then
return vim.fn["coc#_select_confirm"]()
else
return escape_keycode([[\<C-g>u\<CR>\<c-r>=coc#on_enter()\<CR>]])
return escape_keycode [[\<C-g>u\<CR>\<c-r>=coc#on_enter()\<CR>]]
end
end

View file

@ -1,8 +1,8 @@
-- BASED OFF https://github.com/LoydAndrew/nvim/blob/main/evilline.lua
local gl = require("galaxyline")
local gl = require "galaxyline"
local gls = gl.section
local extension = require("galaxyline.provider_extensions")
local extension = require "galaxyline.provider_extensions"
gl.short_line_list = {
"LuaTree",
@ -83,7 +83,7 @@ local function get_coc_lsp()
end
function get_diagnostic_info()
if vim.fn.exists("*coc#rpc#start_server") == 1 then
if vim.fn.exists "*coc#rpc#start_server" == 1 then
return get_coc_lsp()
end
return ""
@ -98,7 +98,7 @@ local function get_current_func()
end
function get_function_info()
if vim.fn.exists("*coc#rpc#start_server") == 1 then
if vim.fn.exists "*coc#rpc#start_server" == 1 then
return get_current_func()
end
return ""
@ -126,7 +126,7 @@ function has_file_type()
end
local buffer_not_empty = function()
if vim.fn.empty(vim.fn.expand("%:t")) ~= 1 then
if vim.fn.empty(vim.fn.expand "%:t") ~= 1 then
return true
end
return false

View file

@ -1,7 +1,7 @@
local pears = require("pears")
local pears = require "pears"
pears.setup(function(conf)
conf.preset("tag_matching")
conf.preset "tag_matching"
conf.on_enter(function(pears_handle)
if vim.fn.pumvisible() == 1 then

View file

@ -1,4 +1,4 @@
require("nvim-tree").setup({
require("nvim-tree").setup {
-- don't open tree when using firenvim
open_on_setup = not vim.g.started_by_firenvim,
auto_close = true,
@ -8,4 +8,4 @@ require("nvim-tree").setup({
view = {
auto_resize = true,
},
})
}

View file

@ -1,4 +1,4 @@
require("telescope").setup({
require("telescope").setup {
defaults = {
vimgrep_arguments = {
"rg",
@ -10,4 +10,4 @@ require("telescope").setup({
"--smart-case",
},
},
})
}

View file

@ -1,5 +1,5 @@
local configs = require("nvim-treesitter.configs")
local parsers = require("nvim-treesitter.parsers")
local configs = require "nvim-treesitter.configs"
local parsers = require "nvim-treesitter.parsers"
local parser_config = parsers.get_parser_configs()
@ -12,9 +12,9 @@ parser_config.haxe = {
filetype = "haxe",
}
configs.setup({
configs.setup {
ensure_installed = { "haxe" },
highlight = {
enable = true,
},
})
}

View file

@ -1,80 +1,76 @@
vim.cmd([[packadd packer.nvim]])
vim.cmd [[packadd packer.nvim]]
local function pconf(plugin)
return 'require("pluginconf.' .. plugin .. '")'
end
return require("packer").startup(function(use)
use("wbthomason/packer.nvim")
use "wbthomason/packer.nvim"
use({
use {
"neoclide/coc.nvim",
branch = "release",
config = pconf("coc"),
})
use("ryanoasis/vim-devicons")
use({
"cespare/vim-toml",
branch = "main",
})
use({
config = pconf "coc",
}
use "ryanoasis/vim-devicons"
use {
"dracula/vim",
as = "dracula",
})
use("vimwiki/vimwiki")
use({
}
use "vimwiki/vimwiki"
use {
"glacambre/firenvim",
run = function()
vim.fn["firenvim#install"](0)
end,
config = pconf("firenvim"),
})
use("airblade/vim-gitgutter")
use("dag/vim-fish")
use("uiiaoo/java-syntax.vim")
use("honza/vim-snippets")
use("sheerun/vim-polyglot")
use({
config = pconf "firenvim",
}
use "airblade/vim-gitgutter"
use "dag/vim-fish"
use "uiiaoo/java-syntax.vim"
use "honza/vim-snippets"
use "sheerun/vim-polyglot"
use {
"glepnir/galaxyline.nvim",
branch = "main",
config = pconf("galaxyline"),
})
use({
config = pconf "galaxyline",
}
use {
"nvim-treesitter/nvim-treesitter",
run = ":TSUpdate",
config = pconf("treesitter"),
})
use({
config = pconf "treesitter",
}
use {
"euclio/vim-markdown-composer",
run = "cargo build --release",
config = pconf("markdowncomposer"),
})
config = pconf "markdowncomposer",
}
use("kassio/neoterm")
use "kassio/neoterm"
use("kyazdani42/nvim-web-devicons")
use "kyazdani42/nvim-web-devicons"
use({
use {
"kyazdani42/nvim-tree.lua",
requires = "kyazdani42/nvim-web-devicons",
config = pconf("nvimtree"),
})
config = pconf "nvimtree",
}
use({
use {
"TimUntersberger/neogit",
requires = "nvim-lua/plenary.nvim",
})
}
use("ron-rs/ron.vim")
use "ron-rs/ron.vim"
use({
use {
"nvim-telescope/telescope.nvim",
requires = "nvim-lua/plenary.nvim",
config = pconf("telescope"),
})
use("gluon-lang/vim-gluon")
use({
config = pconf "telescope",
}
use "gluon-lang/vim-gluon"
use {
"steelsojka/pears.nvim",
config = pconf("nvim_pears"),
})
config = pconf "nvim_pears",
}
end)

View file

@ -4,7 +4,7 @@ local o = vim.o
local wo = vim.wo
local g = vim.g
cmd("syntax on")
cmd "syntax on"
o.tabstop = 4
o.shiftwidth = 4
o.expandtab = true
@ -19,11 +19,11 @@ g.airline_powerline_fonts = 1
g.neoterm_default_mod = "tab"
g.neovide_iso_layout = true
cmd("colorscheme dracula")
cmd "colorscheme dracula"
-- Highlight the symbol and its references when holding the cursor.
cmd("autocmd CursorHold * silent call CocActionAsync('highlight')")
cmd "autocmd CursorHold * silent call CocActionAsync('highlight')"
cmd("autocmd StdinReadPre * let s:std_in=1")
cmd "autocmd StdinReadPre * let s:std_in=1"
cmd("filetype plugin on")
cmd "filetype plugin on"

View file

@ -1,84 +0,0 @@
local wezterm = require "wezterm"
local gitbash = {"C:\\Program Files\\Git\\bin\\bash.exe", "-i", "-l"}
return {
color_scheme = "Dracula",
default_prog = gitbash,
keys = {
{
key = "F3",
action = "ShowLauncher",
},
{
key = "Y",
mods = "CTRL",
action = "Copy",
},
{
key = "C",
mods = "CTRL",
action = "DisableDefaultAssignment",
},
{
key = " ",
mods = "CTRL|SHIFT",
action = "ActivateCopyMode",
},
{
key = "9",
mods = "ALT",
action = "DisableDefaultAssignment",
},
},
ssh_domains = {
{
name = "RPI",
remote_address = "192.168.2.5",
username = "pi",
}
},
font_dirs = {"C:\\Windows\\Fonts"},
font_rules = {
{
italic = false,
bold = false,
font = wezterm.font("Iosevka Nerd Font Complete"),
},
{
italic = true,
bold = false,
font = wezterm.font("Iosevka Italic Nerd Font Complete"),
},
{
italic = false,
bold = true,
font = wezterm.font("Iosevka Bold Nerd Font Complete"),
},
{
italic = true,
bold = true,
font = wezterm.font("Iosevka Bold Italic Nerd Font Complete"),
},
},
launch_menu = {
{
label = "Arch WSL",
args = {"wsl", "-d", "Arch"},
},
{
label = "Ubuntu WSL",
args = {"wsl", "-d", "Ubuntu-20.04"},
},
{
label = "Powershell",
args = {"powershell"},
},
{
label = "Git Bash",
args = gitbash,
},
},
}

2
stylua.toml Normal file
View file

@ -0,0 +1,2 @@
indent_type = "Spaces"
no_call_parentheses = true