aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--init.lua185
-rw-r--r--lua/plugins/cmp.lua11
-rw-r--r--lua/plugins/colorscheme.lua6
-rw-r--r--lua/plugins/fzf.lua4
-rw-r--r--lua/plugins/orgmode.lua17
-rw-r--r--lua/plugins/telescope.lua4
6 files changed, 119 insertions, 108 deletions
diff --git a/init.lua b/init.lua
index 7f7887f..5152093 100644
--- a/init.lua
+++ b/init.lua
@@ -13,33 +13,22 @@ if not (vim.uv or vim.loop).fs_stat(lazypath) then
13 }) 13 })
14end 14end
15vim.opt.rtp:prepend(lazypath) 15vim.opt.rtp:prepend(lazypath)
16
16require("lazy").setup({ 17require("lazy").setup({
17 'junegunn/fzf', 18 spec = {
18 'junegunn/fzf.vim', 19 { import = "plugins", },
19 'nvim-tree/nvim-web-devicons', 20 'nvim-tree/nvim-web-devicons',
20 'lewis6991/gitsigns.nvim', 21 'lewis6991/gitsigns.nvim',
21 'folke/neodev.nvim', 22 'folke/neodev.nvim',
22 'neovim/nvim-lspconfig',
23 'hrsh7th/cmp-nvim-lsp',
24 'hrsh7th/cmp-buffer',
25 'hrsh7th/cmp-path',
26 'hrsh7th/cmp-cmdline',
27 'hrsh7th/nvim-cmp',
28 'hrsh7th/vim-vsnip',
29 'octaltree/cmp-look',
30 'L3MON4D3/LuaSnip',
31 'saadparwaiz1/cmp_luasnip',
32 'RRethy/base16-nvim',
33 -- treesitter is experimental and breaks indentation on xml, html with `=` 23 -- treesitter is experimental and breaks indentation on xml, html with `=`
34 -- 'nvim-treesitter/nvim-treesitter', 24 'nvim-treesitter/nvim-treesitter',
35 'nvim-lua/popup.nvim', 25 'nvim-lua/popup.nvim',
36 'nvim-lua/plenary.nvim', 26 'nvim-lua/plenary.nvim',
37 'nvim-telescope/telescope.nvim',
38 'nvim-telescope/telescope-media-files.nvim',
39 'coderonline/vim-fancy-line', 27 'coderonline/vim-fancy-line',
40 'coderonline/vim-recently-used', 28 'coderonline/vim-recently-used',
41 'norcalli/nvim-colorizer.lua', 29 'norcalli/nvim-colorizer.lua',
42 'folke/trouble.nvim', 30 'folke/trouble.nvim',
31 }
43}) 32})
44 33
45-------------------------------------------------------------------------------- 34--------------------------------------------------------------------------------
@@ -47,7 +36,7 @@ require("lazy").setup({
47-------------------------------------------------------------------------------- 36--------------------------------------------------------------------------------
48local configdir = vim.fn.fnamemodify(vim.fn.expand("$MYVIMRC"), ":p:h") 37local configdir = vim.fn.fnamemodify(vim.fn.expand("$MYVIMRC"), ":p:h")
49vim.cmd('source ' .. configdir .. '/vimrc') 38vim.cmd('source ' .. configdir .. '/vimrc')
50vim.cmd.colorscheme "base16-rebecca" 39-- vim.cmd.colorscheme "base16-rebecca"
51-- vim.cmd.colorscheme "base16-katy" 40-- vim.cmd.colorscheme "base16-katy"
52 41
53vim.opt.encoding = 'utf-8' 42vim.opt.encoding = 'utf-8'
@@ -184,102 +173,82 @@ cmp.setup({
184 }) 173 })
185}) 174})
186 175
187-- Use buffer source for `/` and `?` (if you enabled `native_menu`, this won't work anymore).
188cmp.setup.cmdline({ '/', '?' }, {
189 mapping = cmp.mapping.preset.cmdline({
190 ['<Down>'] = { c = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Insert }) },
191 ['<Up>'] = { c = cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Insert }) },
192 }),
193 sources = {{ name = 'buffer' }}
194})
195
196-- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore).
197cmp.setup.cmdline(':', {
198 mapping = cmp.mapping.preset.cmdline({
199 ['<Down>'] = { c = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Insert }) },
200 ['<Up>'] = { c = cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Insert }) },
201 }),
202 sources = cmp.config.sources(
203 {{ name = 'path' }},
204 {{ name = 'cmdline' }}
205 ),
206 matching = {
207 disallow_symbol_nonprefix_matching = false,
208 disallow_partial_matching = false,
209 disallow_fullfuzzy_matching = false,
210 disallow_fuzzy_matching = false,
211 disallow_partial_fuzzy_matching = false,
212 disallow_prefix_unmatching = false,
213 }
214})
215
216-- Set up lspconfig. 176-- Set up lspconfig.
217local capabilities = require('cmp_nvim_lsp').default_capabilities() 177local cmp_nvim_lsp = require "cmp_nvim_lsp"
178
179require("lspconfig").clangd.setup {
180 on_attach = on_attach,
181 capabilities = cmp_nvim_lsp.default_capabilities(),
182 cmd = {
183 "clangd",
184 "--offset-encoding=utf-16",
185 },
186}
187-- local capabilities = require('cmp_nvim_lsp').default_capabilities()
218 188
219-- # Language Servers 189-- # Language Servers
220-- https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md 190-- https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md
221 191
222-- C/C++ | clang 192-- C/C++ | clang
223require('lspconfig')['bitbake_language_server'].setup{capabilities = capabilities} 193-- require('lspconfig')['bitbake_language_server'].setup{}
224require('lspconfig')['clangd'].setup{capabilities = capabilities} 194-- require('lspconfig')['clangd'].setup{}
225-- lua (but not init.lua entirely, hence why neodev) 195-- -- lua (but not init.lua entirely, hence why neodev)
226require('lspconfig')['lua_ls'].setup { capabilities = capabilities } 196-- require('lspconfig')['lua_ls'].setup { }
227-- require('lspconfig')['java_language_server'].setup{ cmd = { "/usr/share/java/java-language-server/lang_server_linux.sh" }, root_dir = function () return vim.fn.getcwd() end } 197-- -- require('lspconfig')['java_language_server'].setup{ cmd = { "/usr/share/java/java-language-server/lang_server_linux.sh" }, root_dir = function () return vim.fn.getcwd() end }
228require'lspconfig'.jdtls.setup{} 198-- require'lspconfig'.jdtls.setup{}
229-- bash | bash-language-server 199-- -- bash | bash-language-server
230require('lspconfig')['bashls'].setup{capabilities = capabilities} 200-- require('lspconfig')['bashls'].setup{}
231-- ccs | vscode-css-languageserver 201-- -- ccs | vscode-css-languageserver
232require('lspconfig')['cssls'].setup{capabilities = capabilities} 202-- require('lspconfig')['cssls'].setup{}
233-- rust | rust-analyzer 203-- -- rust | rust-analyzer
234require('lspconfig')['rust_analyzer'].setup{capabilities = capabilities} 204-- require('lspconfig')['rust_analyzer'].setup{}
235-- javascript | eslint 205-- -- javascript | eslint
236require('lspconfig')['eslint'].setup{capabilities = capabilities} 206-- require('lspconfig')['eslint'].setup{}
237-- javascript | typescript-language-server 207-- -- javascript | typescript-language-server
238require('lspconfig')['tsserver'].setup{capabilities = capabilities} 208-- require('lspconfig')['tsserver'].setup{}
239-- vimscript | vim-language-server 209-- -- vimscript | vim-language-server
240require('lspconfig')['vimls'].setup{capabilities = capabilities} 210-- require('lspconfig')['vimls'].setup{}
241-- html 211-- -- html
242require('lspconfig')['html'].setup{capabilities = capabilities} 212-- require('lspconfig')['html'].setup{}
243-- jsonls 213-- -- jsonls
244require('lspconfig')['jsonls'].setup{capabilities = capabilities} 214-- require('lspconfig')['jsonls'].setup{}
245-- C/C++ | clang 215-- -- C/C++ | clang
246require('lspconfig')['clangd'].setup{capabilities = capabilities} 216-- require('lspconfig')['clangd'].setup{}
247-- bash | bash-language-server 217-- -- bash | bash-language-server
248require('lspconfig')['bashls'].setup{capabilities = capabilities} 218-- require('lspconfig')['bashls'].setup{}
249-- ccs | vscode-css-languageserver 219-- -- ccs | vscode-css-languageserver
250require('lspconfig')['cssls'].setup{capabilities = capabilities} 220-- require('lspconfig')['cssls'].setup{}
251-- rust | rust-analyzer 221-- -- rust | rust-analyzer
252require('lspconfig')['rust_analyzer'].setup{capabilities = capabilities} 222-- require('lspconfig')['rust_analyzer'].setup{}
253-- javascript | eslint 223-- -- javascript | eslint
254require('lspconfig')['eslint'].setup{capabilities = capabilities} 224-- require('lspconfig')['eslint'].setup{}
255-- javascript | typescript-language-server 225-- -- javascript | typescript-language-server
256require('lspconfig')['tsserver'].setup{capabilities = capabilities} 226-- require('lspconfig')['tsserver'].setup{}
257-- vimscript | vim-language-server 227-- -- vimscript | vim-language-server
258require('lspconfig')['vimls'].setup{capabilities = capabilities} 228-- require('lspconfig')['vimls'].setup{}
259-- configure html server 229-- -- configure html server
260require('lspconfig')["html"].setup({ 230-- require('lspconfig')["html"].setup({
261 capabilities = capabilities, 231-- -- on_attach = on_attach,
262 -- on_attach = on_attach, 232-- init_options = {
263 init_options = { 233-- configurationSection = { "html", "css", "javascript" },
264 configurationSection = { "html", "css", "javascript" }, 234-- embeddedLanguages = {
265 embeddedLanguages = { 235-- css = true,
266 css = true, 236-- javascript = true,
267 javascript = true, 237-- },
268 }, 238-- provideFormatter = true,
269 provideFormatter = true, 239-- },
270 }, 240-- })
271}) 241-- require('lspconfig')['pylsp'].setup{
272require('lspconfig')['pylsp'].setup{ 242-- settings = {
273 settings = { 243-- pylsp = {
274 pylsp = { 244-- plugins = {
275 plugins = { 245-- pycodestyle = {
276 pycodestyle = { 246-- ignore = {'W391'},
277 ignore = {'W391'}, 247-- maxLineLength = 100
278 maxLineLength = 100 248-- }
279 } 249-- }
280 } 250-- }
281 } 251-- }
282 } 252-- }
283}
284 253
285-- vim: tabstop=2 shiftwidth=2 softtabstop=2 254-- vim: tabstop=2 shiftwidth=2 softtabstop=2
diff --git a/lua/plugins/cmp.lua b/lua/plugins/cmp.lua
new file mode 100644
index 0000000..fed96e4
--- /dev/null
+++ b/lua/plugins/cmp.lua
@@ -0,0 +1,11 @@
1return {
2 'neovim/nvim-lspconfig',
3 'hrsh7th/cmp-nvim-lsp',
4 'hrsh7th/cmp-buffer',
5 'hrsh7th/cmp-path',
6 'hrsh7th/nvim-cmp',
7 'hrsh7th/vim-vsnip',
8 'L3MON4D3/LuaSnip',
9 'octaltree/cmp-look',
10 'saadparwaiz1/cmp_luasnip',
11}
diff --git a/lua/plugins/colorscheme.lua b/lua/plugins/colorscheme.lua
new file mode 100644
index 0000000..a73b1e8
--- /dev/null
+++ b/lua/plugins/colorscheme.lua
@@ -0,0 +1,6 @@
1return {
2 'RRethy/base16-nvim',
3 config = function()
4 vim.cmd.colorscheme "base16-rebecca"
5 end,
6}
diff --git a/lua/plugins/fzf.lua b/lua/plugins/fzf.lua
new file mode 100644
index 0000000..f3fc76b
--- /dev/null
+++ b/lua/plugins/fzf.lua
@@ -0,0 +1,4 @@
1return {
2 'junegunn/fzf',
3 'junegunn/fzf.vim',
4}
diff --git a/lua/plugins/orgmode.lua b/lua/plugins/orgmode.lua
new file mode 100644
index 0000000..fe09f3e
--- /dev/null
+++ b/lua/plugins/orgmode.lua
@@ -0,0 +1,17 @@
1return {
2 'nvim-orgmode/orgmode',
3 event = 'VeryLazy',
4 ft = { 'org' },
5 config = function()
6 -- Setup orgmode
7 require('orgmode').setup({
8 org_agenda_files = '~/orgfiles/**/*',
9 org_default_notes_file = '~/orgfiles/refile.org',
10 })
11 require('cmp').setup({
12 sources = {
13 { name = 'orgmode' }
14 }
15 })
16 end,
17}
diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua
new file mode 100644
index 0000000..ed65c3f
--- /dev/null
+++ b/lua/plugins/telescope.lua
@@ -0,0 +1,4 @@
1return {
2 'nvim-telescope/telescope.nvim',
3 'nvim-telescope/telescope-media-files.nvim',
4}
..