4
4
vim .g .mapleader = ' '
5
5
vim .g .maplocalleader = ' '
6
6
7
+ -- Disable editorconfig
8
+ -- vim.g.editorconfig = false
9
+
7
10
-- Set to true if you have a Nerd Font installed and selected in the terminal
8
11
vim .g .have_nerd_font = true
9
12
@@ -12,10 +15,10 @@ vim.g.have_nerd_font = true
12
15
-- NOTE: You can change these options as you wish!
13
16
-- For more options, you can see `:help option-list`
14
17
18
+ vim .opt .wrap = false
19
+
15
20
-- Make line numbers default
16
21
vim .opt .number = true
17
- -- You can also add relative line numbers, to help with jumping.
18
- -- Experiment for yourself to see if you like it!
19
22
-- vim.opt.relativenumber = true
20
23
21
24
-- Enable mouse mode, can be useful for resizing splits for example!
@@ -25,9 +28,6 @@ vim.opt.mouse = 'a'
25
28
vim .opt .showmode = false
26
29
27
30
-- Sync clipboard between OS and Neovim.
28
- -- Schedule the setting after `UiEnter` because it can increase startup-time.
29
- -- Remove this option if you want your OS clipboard to remain independent.
30
- -- See `:help 'clipboard'`
31
31
vim .schedule (function ()
32
32
vim .opt .clipboard = ' unnamedplus'
33
33
end )
@@ -144,6 +144,10 @@ vim.opt.rtp:prepend(lazypath)
144
144
require (' lazy' ).setup ({
145
145
-- NOTE: Plugins can be added with a link (or for a github repo: 'owner/repo' link).
146
146
' tpope/vim-sleuth' , -- Detect tabstop and shiftwidth automatically
147
+ ' vim-scripts/Mark--Karkat' , -- Highlight words using different colors
148
+ ' kylelaker/riscv.vim' ,
149
+ ' dcharbon/vim-flatbuffers' ,
150
+ ' vhda/verilog_systemverilog.vim' ,
147
151
148
152
-- NOTE: Plugins can also be added by using a table,
149
153
-- with the first argument being the link and the following
@@ -244,19 +248,24 @@ require('lazy').setup({
244
248
version = ' *' ,
245
249
dependencies = {
246
250
' nvim-lua/plenary.nvim' ,
247
- ' nvim-tree/nvim-web-devicons' , -- not strictly required, but recommended
251
+ ' nvim-tree/nvim-web-devicons' ,
248
252
' MunifTanjim/nui.nvim' ,
249
253
},
250
254
cmd = ' Neotree' ,
251
255
keys = {
252
- { ' \\ ' , ' :Neotree reveal <CR>' , desc = ' NeoTree reveal' , silent = true },
256
+ { ' \\ ' , ' :Neotree reveal_force_cwd <CR>' , desc = ' NeoTree reveal' , silent = true },
253
257
},
254
258
opts = {
259
+ sources = { " filesystem" , " buffers" , " git_status" },
260
+ open_files_do_not_replace_types = { " terminal" , " Trouble" , " trouble" , " qf" , " Outline" },
255
261
filesystem = {
256
- window = {
257
- mappings = {
258
- [' \\ ' ] = ' close_window' ,
259
- },
262
+ bind_to_cwd = false ,
263
+ follow_current_file = { enabled = true },
264
+ use_libuv_file_watcher = true ,
265
+ },
266
+ window = {
267
+ mappings = {
268
+ [' \\ ' ] = ' close_window' ,
260
269
},
261
270
},
262
271
},
@@ -595,49 +604,6 @@ require('lazy').setup({
595
604
end ,
596
605
},
597
606
598
- { -- Autoformat
599
- ' stevearc/conform.nvim' ,
600
- event = { ' BufWritePre' },
601
- cmd = { ' ConformInfo' },
602
- keys = {
603
- {
604
- ' <leader>f' ,
605
- function ()
606
- require (' conform' ).format { async = true , lsp_format = ' fallback' }
607
- end ,
608
- mode = ' ' ,
609
- desc = ' [F]ormat buffer' ,
610
- },
611
- },
612
- opts = {
613
- notify_on_error = false ,
614
- format_on_save = function (bufnr )
615
- -- Disable "format_on_save lsp_fallback" for languages that don't
616
- -- have a well standardized coding style. You can add additional
617
- -- languages here or re-enable it for the disabled ones.
618
- local disable_filetypes = { c = true , cpp = true }
619
- local lsp_format_opt
620
- if disable_filetypes [vim .bo [bufnr ].filetype ] then
621
- lsp_format_opt = ' never'
622
- else
623
- lsp_format_opt = ' fallback'
624
- end
625
- return {
626
- timeout_ms = 500 ,
627
- lsp_format = lsp_format_opt ,
628
- }
629
- end ,
630
- formatters_by_ft = {
631
- lua = { ' stylua' },
632
- -- Conform can also run multiple formatters sequentially
633
- -- python = { "isort", "black" },
634
- --
635
- -- You can use 'stop_after_first' to run the first available formatter from the list
636
- -- javascript = { "prettierd", "prettier", stop_after_first = true },
637
- },
638
- },
639
- },
640
-
641
607
{ -- Autocompletion
642
608
' hrsh7th/nvim-cmp' ,
643
609
event = ' InsertEnter' ,
@@ -693,25 +659,13 @@ require('lazy').setup({
693
659
--
694
660
-- No, but seriously. Please read `:help ins-completion`, it is really good!
695
661
mapping = cmp .mapping .preset .insert {
696
- -- Select the [n]ext item
697
- [' <C-n>' ] = cmp .mapping .select_next_item (),
698
- -- Select the [p]revious item
699
- [' <C-p>' ] = cmp .mapping .select_prev_item (),
700
-
701
662
-- Scroll the documentation window [b]ack / [f]orward
702
663
[' <C-b>' ] = cmp .mapping .scroll_docs (- 4 ),
703
664
[' <C-f>' ] = cmp .mapping .scroll_docs (4 ),
704
665
705
- -- Accept ([y]es) the completion.
706
- -- This will auto-import if your LSP supports it.
707
- -- This will expand snippets if the LSP sent a snippet.
708
- [' <C-y>' ] = cmp .mapping .confirm { select = true },
709
-
710
- -- If you prefer more traditional completion keymaps,
711
- -- you can uncomment the following lines
712
- -- ['<CR>'] = cmp.mapping.confirm { select = true },
713
- -- ['<Tab>'] = cmp.mapping.select_next_item(),
714
- -- ['<S-Tab>'] = cmp.mapping.select_prev_item(),
666
+ [' <CR>' ] = cmp .mapping .confirm { select = true },
667
+ [' <Tab>' ] = cmp .mapping .select_next_item (),
668
+ [' <S-Tab>' ] = cmp .mapping .select_prev_item (),
715
669
716
670
-- Manually trigger a completion from nvim-cmp.
717
671
-- Generally you don't need this, because nvim-cmp will display
@@ -837,29 +791,6 @@ require('lazy').setup({
837
791
-- - Show your current context: https://github.com/nvim-treesitter/nvim-treesitter-context
838
792
-- - Treesitter + textobjects: https://github.com/nvim-treesitter/nvim-treesitter-textobjects
839
793
},
840
-
841
- -- The following two comments only work if you have downloaded the kickstart repo, not just copy pasted the
842
- -- init.lua. If you want these files, they are in the repository, so you can just download them and
843
- -- place them in the correct locations.
844
-
845
- -- NOTE: Next step on your Neovim journey: Add/Configure additional plugins for Kickstart
846
- --
847
- -- Here are some example plugins that I've included in the Kickstart repository.
848
- -- Uncomment any of the lines below to enable them (you will need to restart nvim).
849
- --
850
- -- require 'kickstart.plugins.debug',
851
- -- require 'kickstart.plugins.indent_line',
852
- -- require 'kickstart.plugins.lint',
853
- -- require 'kickstart.plugins.autopairs',
854
- -- require 'kickstart.plugins.neo-tree',
855
- -- require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps
856
-
857
- -- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua`
858
- -- This is the easiest way to modularize your config.
859
- --
860
- -- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going.
861
- -- For additional information, see `:help lazy.nvim-lazy.nvim-structuring-your-plugins`
862
- -- { import = 'custom.plugins' },
863
794
}, {
864
795
ui = {
865
796
-- If you are using a Nerd Font: set icons to an empty table which will use the
@@ -882,5 +813,4 @@ require('lazy').setup({
882
813
},
883
814
})
884
815
885
- -- The line beneath this is called `modeline`. See `:help modeline`
886
816
-- vim: ts=2 sts=2 sw=2 et
0 commit comments