aboutsummaryrefslogtreecommitdiff
path: root/Common
diff options
context:
space:
mode:
authorjakob.stendahl <jakob.stendahl@infomedia.dk>2024-01-25 21:01:10 +0100
committerjakob.stendahl <jakob.stendahl@infomedia.dk>2024-01-25 21:01:10 +0100
commitd87f599f413d6dc17a15188a62106caa868dc68d (patch)
tree0d86e2fc9324bcdfa1ca0ef6ab1a4f8e84a04a09 /Common
parent2a260e88abbc8012aee7dc6c6c3c69c87ec59b60 (diff)
downloaddotfiles-d87f599f413d6dc17a15188a62106caa868dc68d.tar.gz
dotfiles-d87f599f413d6dc17a15188a62106caa868dc68d.zip
things
Diffstat (limited to 'Common')
-rwxr-xr-xCommon/nvim/lua/basic.lua37
-rwxr-xr-xCommon/nvim/lua/helper_functions.lua10
-rwxr-xr-xCommon/nvim/lua/plugins.lua2
3 files changed, 13 insertions, 36 deletions
diff --git a/Common/nvim/lua/basic.lua b/Common/nvim/lua/basic.lua
index 9d28267..d24fbc9 100755
--- a/Common/nvim/lua/basic.lua
+++ b/Common/nvim/lua/basic.lua
@@ -10,12 +10,6 @@ vim.opt.nu = false
-- Autoread when file is changed outside vim
vim.opt.autoread = true
--- enable filetype plugins
-vim.cmd [[
- filetype plugin on
- filetype indent on
-]]
-
-- Use a mapleader
--vim.opt.mapleader = ","
vim.g.mapleader = ","
@@ -76,12 +70,6 @@ vim.opt.magic = true
vim.opt.showmatch = true
vim.opt.mat = 2
--- Turn off annoying bells aon errors
---vim.opt.noerrorbells = false
---vim.opt.novisualbell = false
---vim.opt.t_vb = ''
---vim.opt.tm = 500
-
-- Left column option, used to have it at 1 to always show it. But Gitsigns is not using it anyway
vim.opt.foldcolumn = '0'
@@ -92,11 +80,6 @@ vim.opt.showcmd = true
vim.opt.colorcolumn = '80,120'
vim.cmd [[ highlight ColorColumn ctermbg=16 ]]
--- => Colors and Fonts
-
--- Enable syntac highlighting
---vim.opt.syntax = 'enable'
-
-- Colorscheme
-- default
vim.cmd [[ colorscheme default ]]
@@ -140,14 +123,12 @@ vim.opt.shiftwidth = 4
vim.opt.tabstop = 4
vim.opt.softtabstop = 4
--- Linebreak on 500 ch
-vim.opt.lbr = true
-vim.opt.tw = 500
-
-- Auto indent
vim.opt.ai = true
+
-- Smart indent
vim.opt.si = true
+
-- Wrap lines
vim.opt.wrap = true
@@ -256,19 +237,6 @@ map('n', '<leader>pp', ':setlocal paste!<cr>', silentnoremap)
vim.opt.titlestring = [[%f %h%m%r%w%{v:progname} (%{tabpagenr()} of %{tabpagenr('$')}})]]
vim.opt.title = true
--- Toggle displaying special characters
-vim.keymap.set('n', '<leader><tab>', ToggleListChars, silentnoremap)
-
--- Load and save session
-map('n', '<leader>sm', ':mksession! vim_session.vim<cr>', silentnoremap)
-map('n', '<leader>sl', ':source vim_session.vim<cr>', silentnoremap)
-
--- Dont't close window when deleting buffer
---vim.api.nvim_create_user_command("Bclose",
--- "<SID>BufcloseCloseIt()",
--- {bang = true}
---)
-
--[[
Debugging
--]]
@@ -277,6 +245,5 @@ vim.g.termdebug_wide = 163
vim.cmd([[:packadd termdebug]])
-
-- This is to get rid of weird artifacts with text showing up inside buffer.
vim.opt.title = false
diff --git a/Common/nvim/lua/helper_functions.lua b/Common/nvim/lua/helper_functions.lua
index 1f57a09..027e823 100755
--- a/Common/nvim/lua/helper_functions.lua
+++ b/Common/nvim/lua/helper_functions.lua
@@ -21,6 +21,7 @@ function ToggleListChars()
vim.opt.list = list_chars_enabled
vim.opt.listchars = list_chars_enabled and list_chars_when_enabled or 'eol:$'
end
+vim.keymap.set('n', '<leader><tab>', ToggleListChars, silentnoremap)
-- Command to join lines in buffer as list
function JoinLines(args, quotes)
@@ -78,6 +79,15 @@ function Norsk()
end
vim.api.nvim_create_user_command('Norsk', Norsk, {bang=false, desc='Enables spellchecking for norsk bokmål'})
+-- enable filetype and such
+function auto()
+ vim.cmd [[
+ filetype plugin on
+ filetype indent on
+ ]]
+end
+vim.api.nvim_create_user_command('A', auto, {bang=false, desc='Enable filetype plugin and indent'})
+
-- Close buffer without closing window
--[[
vim.cmd [[
diff --git a/Common/nvim/lua/plugins.lua b/Common/nvim/lua/plugins.lua
index e4ba713..6b8cbbf 100755
--- a/Common/nvim/lua/plugins.lua
+++ b/Common/nvim/lua/plugins.lua
@@ -167,7 +167,7 @@ return require('packer').startup(function(use)
config = function ()
vim.g.vimwiki_list = {
{
- path = '~/Nextcloud/wiki/I45',
+ path = '~/Nextcloud/2-Områder/204-profesjonelt/204.06-Infomedia/204.06.AA-wiki',
syntax = 'markdown',
ext = 'md',
name = 'I45',