diff options
-rwxr-xr-x | Common/nvim/lua/basic.lua | 37 | ||||
-rwxr-xr-x | Common/nvim/lua/helper_functions.lua | 10 | ||||
-rwxr-xr-x | Common/nvim/lua/plugins.lua | 2 |
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', |