aboutsummaryrefslogtreecommitdiff
path: root/.config/nvim
diff options
context:
space:
mode:
Diffstat (limited to '.config/nvim')
-rw-r--r--.config/nvim/ftdetect/hobbylang.vim1
-rw-r--r--.config/nvim/ftplugin/cs.vim3
-rw-r--r--.config/nvim/lua/map.lua6
-rw-r--r--.config/nvim/lua/plugin/lsp.lua7
-rw-r--r--.config/nvim/lua/plugin/packer.lua4
-rw-r--r--.config/nvim/lua/plugin/setup.lua2
-rw-r--r--.config/nvim/syntax/hobbylang.vim41
7 files changed, 16 insertions, 48 deletions
diff --git a/.config/nvim/ftdetect/hobbylang.vim b/.config/nvim/ftdetect/hobbylang.vim
deleted file mode 100644
index ea320c0..0000000
--- a/.config/nvim/ftdetect/hobbylang.vim
+++ /dev/null
@@ -1 +0,0 @@
-au BufNewFile,BufRead *.hs set filetype=hobbylang
diff --git a/.config/nvim/ftplugin/cs.vim b/.config/nvim/ftplugin/cs.vim
new file mode 100644
index 0000000..2dc3520
--- /dev/null
+++ b/.config/nvim/ftplugin/cs.vim
@@ -0,0 +1,3 @@
+set tabstop=4
+set shiftwidth=4
+set expandtab
diff --git a/.config/nvim/lua/map.lua b/.config/nvim/lua/map.lua
index 94f57d2..6dcc1da 100644
--- a/.config/nvim/lua/map.lua
+++ b/.config/nvim/lua/map.lua
@@ -40,9 +40,11 @@ vim.keymap.set(nv, "G", "Gzz", {})
-- Make going to the end of a line as easy as going to the beginning
vim.keymap.set({"n", "v", "o"}, "+", "$", {})
--- Allow yanking to system clipboard
+-- Yanking and pasting
vim.keymap.set(nv, "<leader>y", "\"+y", {})
vim.keymap.set(nv, "<leader>p", "\"+p", {})
+vim.keymap.set("x", "p", "\"_dP", {})
+vim.keymap.set("x", "<leader>P", "p", {})
-- Commands
vim.keymap.set(nv, "<leader>c", "<CMD>set invhlsearch<CR>", {silent=true})
@@ -51,6 +53,8 @@ vim.keymap.set(nv, "<leader>t", function()
vim.cmd("split")
vim.cmd("term")
end, {silent=true})
+vim.keymap.set("n", "{", "<CMD>cp<CR>", {silent=true})
+vim.keymap.set("n", "}", "<CMD>cn<CR>", {silent=true})
-- Common typo with me
vim.api.nvim_create_user_command("W", "w", {bang=true})
diff --git a/.config/nvim/lua/plugin/lsp.lua b/.config/nvim/lua/plugin/lsp.lua
index 0c02c4f..fc4b869 100644
--- a/.config/nvim/lua/plugin/lsp.lua
+++ b/.config/nvim/lua/plugin/lsp.lua
@@ -30,11 +30,6 @@ cmp.setup {
})
}
-require("lsp-format").setup {}
-require("lspconfig").clangd.setup {
- on_attach = require("lsp-format").on_attach
-}
-
lsp.on_attach(function(client, buffer)
local opts = { buffer = buffer, remap = false }
@@ -51,3 +46,5 @@ lsp.setup()
vim.diagnostic.config {
virtual_text = true
}
+
+vim.g.zig_fmt_autosave = 0
diff --git a/.config/nvim/lua/plugin/packer.lua b/.config/nvim/lua/plugin/packer.lua
index f03cca2..eb980fc 100644
--- a/.config/nvim/lua/plugin/packer.lua
+++ b/.config/nvim/lua/plugin/packer.lua
@@ -1,6 +1,10 @@
return require("packer").startup(function(use)
use {"wbthomason/packer.nvim"}
+ use {"andweeb/presence.nvim"}
+
+ use {"hobby-engine/hobby-script-vim"}
+
use {
"nvim-telescope/telescope.nvim",
requires = {
diff --git a/.config/nvim/lua/plugin/setup.lua b/.config/nvim/lua/plugin/setup.lua
index 2eaeee8..c0db20d 100644
--- a/.config/nvim/lua/plugin/setup.lua
+++ b/.config/nvim/lua/plugin/setup.lua
@@ -10,6 +10,8 @@ require("oil").setup {
},
}
+require("presence").setup {}
+
vim.cmd.colorscheme("mine")
local colors = {
diff --git a/.config/nvim/syntax/hobbylang.vim b/.config/nvim/syntax/hobbylang.vim
deleted file mode 100644
index cb02b5b..0000000
--- a/.config/nvim/syntax/hobbylang.vim
+++ /dev/null
@@ -1,41 +0,0 @@
-if exists("b:current_syntax")
- finish
-endif
-
-syn keyword hlStatement break continue return self
-syn keyword hlLabel case
-syn keyword hlConditional if else match
-syn keyword hlRepeat while loop for
-syn keyword hlStructure struct enum var func
-syn keyword hlModifier static global
-syn keyword hlLiteral true false nil
-
-syn match hlFunction /\<\h\w*\ze\_s*(/
-
-syn match hlComment /\/\/.*/
-syn match hlType /[^a-z0-9_][A-Z][A-z0-9_]*/
-syn match hlNumber /\<\d\+\>/
-syn match hlNumber /\<\d\+\.\d*/
-syn match hlOperator /=|\+=|-=|\*=|\/=|%=|\*\*=|\+|-|\*\*|\*|\/|%|\<|\>|\<=|\>=|==|!=|!|\.\./
-
-syn region hlString start="\"" end="\"" contains=hlEscape
-syn region hlString start="'" end="'" contains=hlEscape
-
-syn match hlEscape /\\[ntra"'\\]/
-
-hi def link hlEscape Special
-hi def link hlStructure Structure
-hi def link hlFunction Function
-hi def link hlStatement Statement
-hi def link hlLabel Label
-hi def link hlConditional Conditional
-hi def link hlRepeat Repeat
-hi def link hlModifier StorageClass
-hi def link hlType Type
-hi def link hlString String
-hi def link hlOperator Operator
-hi def link hlNumber Constant
-hi def link hlLiteral Constant
-hi def link hlComment Comment
-
-let b:current_syntax = 'hl'